🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

finding cube coordinates

Started by
1 comment, last by justinxnitsuj 17 years, 3 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?
Advertisement
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.
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