Ziggurat

03-25-2002, 01:47 PM

I need to rotate an ellipse, my code to draw it is:

double const TWO_PI = 6.2831853071795865;

int const NSTEPS = 100;

double t = 0;

glBegin( GL_LINE_LOOP );

for ( int i = 0; i < NSTEPS; ++i )

{

glVertex2d( 0.5 * cos( t ), 0.5 * sin( t ) );

t += TWO_PI / NSTEPS;

}

glEnd();

Now, how do i rotate it???

double const TWO_PI = 6.2831853071795865;

int const NSTEPS = 100;

double t = 0;

glBegin( GL_LINE_LOOP );

for ( int i = 0; i < NSTEPS; ++i )

{

glVertex2d( 0.5 * cos( t ), 0.5 * sin( t ) );

t += TWO_PI / NSTEPS;

}

glEnd();

Now, how do i rotate it???