Twisted cylinders

I’ve to draw two twisted cylinders of two different colors, but I can’t import a model because this shape change at runtime.
How can I make this in OpenGL?


Look at the source code for GLU (you can find it for example if you download Mesa

Adding the twist is very simple (as long as it is along the cylinder center axis) once you figure out how to create the cylinder itself, and that is also very easy.

Give it a try and see for yourself.

I’ve download from the packagage demos and lib, but I didn’t find any examples of twisted cylinders, can you post some code?
Thanks a lot!

As I said, Mesa has the GLU source for creating a cylinder in OpenGL, to add twisting is pretty simple so you can do that yourself without to much work.