cylinder problem

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


I looked at the glucylinder but there is no provision to make a cylinder between two points in space.here is what glucylinder looks like.

void gluCylinder(
GLUquadricObj *qobj,
GLdouble baseRadius,
GLdouble topRadius,
GLdouble height,
GLint slices,
GLint stacks
);

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?)