create pipes with gluCylinder

I want to draw a pipe by using gluCylinder.
We know each turning point along the pipe. I will call the part between two neighbouring points a sectoin (sorry, i am mot a native english speaker) which is to be created by using cylinder.
My idea is : hold one end of the cylinder at the start point of the section while rotate the cylinder so the other end of the cylinder will reach the end point of the sectoin. and one by one these sections join into a pipe.
But i really get lost with the rotation fuction( especailly when more than one coord parameters taking non 0 values)
or is there a better solution( if i don’t have to create the sectoin myself)

Thanks

Look for the code for the windows pipes 3D screen saver, it uses openGL and thoese other early 3D screen savers also.

Microsoft ship the source code for it on the VC++ CD, I somewhere around here laying around maybe I will find it for you.
I may even having burried in my hard drive!!!

Originally posted by beginner620824:
[b]I want to draw a pipe by using gluCylinder.
We know each turning point along the pipe. I will call the part between two neighbouring points a sectoin (sorry, i am mot a native english speaker) which is to be created by using cylinder.
My idea is : hold one end of the cylinder at the start point of the section while rotate the cylinder so the other end of the cylinder will reach the end point of the sectoin. and one by one these sections join into a pipe.
But i really get lost with the rotation fuction( especailly when more than one coord parameters taking non 0 values)
or is there a better solution( if i don’t have to create the sectoin myself)

Thanks[/b]

hi Dear nexusone:

Thank you very much.If you can find the code, please mail it to me:
frank.ya@163.net

Best regard

Liuya, i am a guy in china

but one thing different from Windows pipes is that my pipe wants to make turn at any angle while the window’s pipe make 90 turn and the sections always stay in one plane.

Use GLE (Tubing and Extrusion). It is distributed with GLUT and is more general.
http://linas.org/gle/