coordinates

I am having problems specifying the coordinates. It is not drawing the lines where I want it to be. I want to use Gl_Line_Strip to draw an Hexagon.
Please can any one help me?

I find drawing things out on graph paper sometimes helps to get an idea of coordinates.

Originally posted by Jmolar:
I am having problems specifying the coordinates. It is not drawing the lines where I want it to be. I want to use Gl_Line_Strip to draw an Hexagon.
Please can any one help me?

This is not the most efficient way to do it, but it gets it done. I assume you mean a regular polygon:

int n = 6;
float pi2 = M_PI * 2;
glBegin(GL_LINE_LOOP)
for (int i = 0; i < n; i++) {
glVertex2f(cos(pi2 * i / n), sin(pi2 * i / n);
}
glEnd();