View Full Version : How to code a circular stair?

07-06-2012, 12:45 AM
Hi there,

i'm an absolute beginner, so i registered to improve my skills.

Some facts about me: I study media informatics. Currently i'm learning for a test regarding basics in media (especially graphics and sound). A small part of this is OpenGL.
So i started creating polygons, changing colors, changing the size by keyboard or just let the polygon spin around by pressing x, y or z to rotate to these directions. And it's really fun!!!

Now to my question:
A fellow student told me about the test she wrote a few months ago in this discipline. The question regarding OpenGL was the following:
Model a circular stair, the steps can be entered dynamically. There must be colors and it is all 3D. Each step must be shifted by 20. The camera view was given.
(Hope you know what i mean, my technical english is not very good ;) ).
That's what she has told me, i don't have more information.

The OpenGL-parts in my book just approach things like the structure of an OpenGL-programm, the colors, the primitives - that's all. It's just the basics. So i guess this question should be solved very easily.
But i don't have a clue how to make it. I even checked my red book (without it i would be lost, because my book from the university really sucks) and google. But without success.

Well, i'm pretty sure i won't get the same question. But i'd really like to know how this works.

Maybe there's a nice person here to help me with that? :)

I forgot an important information: The test is just written on paper - no PC is used.

07-06-2012, 06:30 PM
This is not really a OpenGL question (you seek to programmatically create a stair mesh/model suitable for drawing in 3D):
* for generating the mesh data etc - a more appropriate forum would be for example http://www.gamedev.net/forum/21-general-programming/
* for drawing - it would be prudent to learn using buffer objects and not to use any of the deprecated immediate mode stuff.