Drawing a cylinder in opengl

How can i draw a simple cylinder using opengl, with the 3D corodinates of the two ends given?

that’s pretty easy math. You could do it yourself, with little knowledge about trigonometry, or you could use gluCylinder(), which is pretty easy. Even with that you still have to do some math, cause you can’t just pass a start and a end coordinate…

is there a way i can make the ends of two cylinders join together?

Originally posted by tcs:
that’s pretty easy math. You could do it yourself, with little knowledge about trigonometry, or you could use gluCylinder(), which is pretty easy. Even with that you still have to do some math, cause you can’t just pass a start and a end coordinate…

I am sorry but it seems to me that, if you join two ends of a cylinder, it is not a cylinder !

Are you looking for some kind of torus ?

Eric