   Problems drawing Circles
  The goal with code below is to draw two circles on the circumference of a sphere.  One circle is draw around the z-axis and the other is draw around the y-axis.The problem is that one circle is being drawn smaller than the other.  Can anyone spot why this is happening?//// draw horizontal circumference////////////////////////////////////////////////////////////////////////////glColor3fv(&boundingSphereColor_1[0]);// theta - how many degrees of rotation between points drawn on // the circumference of the sphere//////////////////////////////////////////////////////////////////////////static GLfloat theta;static GLfloat interval;interval = Two_Pi() / pointCount;static sizeType i;glBegin(GL_LINE_LOOP);for (i = 0;i < pointCount;++i){   // float Angle = i * (2.0*PI/numPoints);   // float X = cos( Angle )*Radius;   // float Y = sin( Angle )*Radius;   //////////////////////////////////////////////////////////////////////////   theta = i * interval;glVertex2f( cos(theta) * sphere._radius, sin(theta) * sphere._radius);}//end forglEnd();//// draw vertical circumference////////////////////////////////////////////////////////////////////////////glColor3fv(&boundingSphereColor_2[0]);glBegin(GL_LINE_LOOP);for (i = 0;i < pointCount;++i){   // float Angle = i * (2.0*PI/numPoints);   // float X = cos( Angle )*Radius;   // float Y = sin( Angle )*Radius;   //////////////////////////////////////////////////////////////////////////   theta = i * interval;   glVertex3f( cos(theta) * sphere._radius, 0, sin(theta) * sphere._radius);}//end forglEnd();
  You code works fine for me. Two circles of the same size. What exactly do you mean by "being drawn smaller"? Smaller as in smaller radius? Or squeezed? If it's the latter, did you set up your aspect ratio correctly?   ;Quote:Original post by bawYou code works fine for me. Two circles of the same size. What exactly do you mean by "being drawn smaller"? Smaller as in smaller radius? Or squeezed? If it's the latter, did you set up your aspect ratio correctly?If it works for you I...am...not...pleased.The circle drawn around the z-axis has a smaller diameter than the circle drawn around the y-axis.  I have setup my aspect ratio, projection matrix etc accordingly as I render some complex models etc. in the background just fine.This is driving me nuts to be honest.  I mean...what...IS...it???;  That doesn't really makes sense. It'd mean that sphere._radius changed between the two drawings. Do you have any other code between the both circle drawing loops? Like a glScalef? Can't really think of anything else.   ;Quote:Original post by bawThat doesn't really makes sense. It'd mean that sphere._radius changed between the two drawings. Do you have any other code between the both circle drawing loops? Like a glScalef? Can't really think of anything else.I don't have anything else rendering while I'm drawing these circles.I pass my bounding spheres to a function which draws these circles though.  I will look again to check that my radii are not being mutated somewhere.update:The interface to my rendering function requires a const object be passed to it so in fact sphere._radius is immutable.  I'm not trying any shared gl_context multi-threaded rendering stuff either.I'm at home using MSVS 2008...maybe I'll have to setup a GCC machine and let GCC have a crack at it.   