Hi
I am new to opengl .
I want to draw a cylinder between known points (x1,y1,z1) and (x2,y2,z2)with a known radius using opengl /glut/optimizer.
I am stuck up with this.
plz.help me out.
thanks
ashy
Hi
I am new to opengl .
I want to draw a cylinder between known points (x1,y1,z1) and (x2,y2,z2)with a known radius using opengl /glut/optimizer.
I am stuck up with this.
plz.help me out.
thanks
ashy
glu provides routines to render cylinders (glucylinder)
just look in the glu reference about the quadratics stuff
Originally posted by satan:
glu provides routines to render cylinders (glucylinder)
just look in the glu reference about the quadratics stuff
plz help.
ashy
ah, now i got it
everything you need for glucylinder input you have, only problem is getting the right rotations for it
at the moment i do not really have any good ideas
perhaps transfering your line in one point to the origin, converting the second point to spherical coordinates (then you have two angles), calculating the rotations (which will be not so nice to do), and transfering it back to its starting point
looks to complicated to me, perhaps it helps if you tell what you wanne do (why a cylinder on a given line?)