How to draw a cylinder

hello
i am a total beginner in opengl

i have a code to draw a cylinder:

gl.glColor3d(1.0, 0.0, 0.0);
glu.gluCylinder(gluQuadric, 1, 1, 3, 20, 20);

how can i indicate the start and end (x, y, z) coordinates of the cylinder?

any help is greatly appreciated
thanks in advance
:smiley:

If you want to use gluCylinder, this function creates a cylinder along the positive z axis. It starts from z=0.0 and up to your height value, which is 3.

To position it however, you want use the modelview matrix (glTranslatef)