   Asteroids Ship - rotation around center point -- code included..
  just wondering what i need todo to make this center around the origin instead of the last point draw in the loop..glRotatef(rot,0.0, 0.0, 1.0);    glTranslatef(-0.05, 0.0, -2.0);    glBegin(GL_LINE_LOOP); glVertex2f(0,0); glVertex2f(0.03125,0.0625); glVertex2f(.0625, 0); <--ship rotates around this point    glEnd();do i need an additional rotate somewhere? thanks in advance! 
  get rid of the glTranslate call.  That''s telling OpenGL to translate all your verts by (-0.05, 0.0, -2.0) before rotating, so (0.0625, 0) becomes (0.0125, 0) which is *almost* the origin.  Or if you want the ship to appear to rotate about its own center, try something more like glTranslatef(-0.03125, -0.03125, -2.0) instead ;  thanks a lot that is much better! yes i have to include a translate to draw it in the -z axis,otherwise i would never see it. that works fine.. although i can tell it isnt quite center is there a way to know exactly what the center point is? i mean unless there is something wrong with my eyes and it really is rotating about the center..otherwise if my eyes are not deceiving me i see some fluctuation.. anyway i appreciate your help and it looks much better ;  the centroid would be at about (0.03125,0.018), so use glTranslatef(-0.03125,-0.018,-2.0); ;  i think there is some confusion about what those calls really do. first: opengl is NOT backwards, but many explain it like that because it seems easier to say "its doing it the other way round" than explaining the difference between local and global coord system.after loading identity local and global are the same. after you rotate around z your local x and y is NOT the global x and y anymore, so translating -5,0,0 will not move it 5 units to the left of your screen. but if you rotated say 45deg it will move to the bottom left while after 135deg it would move to the bottom right etc.you objects will ALWAYS rotate around their center, but you need to have them translated into position before that or adjust the translation to your new axes. the "center" is 0,0,0 and thats what it will rotate around (translating will move that center). a much easier solution would be to draw your object centered around the origin, instead of making the origin one of the corners. thats common practice whenever you model something and i think there should be a constitutional right to slap artists for delivering a model thats NOT placed at the origin in a sensible way.also, it seems youre working in 2d, so instead of doing ugly work arounds like -2 translations along z it would be easier to use ortho projection and set your clipping planes at -1 1, so a z of 0 will be center (that way you can layer thing above and behind too). if you need perspective projection than moving everything back 2 units as the very first thing of a frame will allow you to forget about it for all other tasks. 