Advertisement

finding cube coordinates

Started by March 04, 2007 10:48 AM
1 comment, last by justinxnitsuj 17 years, 11 months ago
I would like to draw a cube. The coordinates of the vertices of the floor is : glVertex3f (-5.0f, 0.0f, 5.0f); glVertex3f ( 5.0f, 0.0f, 5.0f); glVertex3f ( 5.0f, 0.0f, -5.0f); glVertex3f (-5.0f, 0.0f, -5.0f); How can I find out the coordinates of the other faces?
You gave us the coordinates of a square (drawed with quads, which isn't recommanded btw you should use 2 triangles). Now you want to make a cube out of it? Expend the Y (second) parameter ranging from -5 to 5 keeping the same logic. You will need 6 times these 4 vertex call for all 6 faces.
Advertisement
i recommend you to draw the xyz axis and the cube on a paper. it makes it very easy to find the other coordinates

This topic is closed to new replies.

Advertisement