Skewing of glut primitives problem!

Hi,
Im currently making a human model that can be animated. for some reason when i rotate the model about the torso in any axis (x, y or z) the model becomes skewed. I use glut primitives (glutSolidSphere and glutSolidCube) for the model. When i say skewed i mean that the objects are displayed out of proportion, for example the head instead of being a sphere of radius 1.5, it becomes and oblong. Just wondering if anyone has any idea what could be causing this because ive been working on it for hours!!

Thanks for you help, link664

Does the aspect ratio of window’s client area match the aspect ratio of your projection?
Here’s a piece of code correcting the aspect ratio:
http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=3;t=013367
For gluPerspective it’s even simpler.

i use a perspective view, not orthogonal, but my aspect is right anyway im pretty sure.

the entire code is located here:

http://yallara.cs.rmit.edu.au/~dnatoli/code.htm

and i have posted sum pictures as well showing the distortion:

http://yallara.cs.rmit.edu.au/~dnatoli/model.htm

if that will helps you.

Thanks, link664

i use a perspective view, not orthogonal, but my aspect is right anyway im pretty sure.

Your reshape function looks broken (same instruction in both if-branches) and will crash for zero height windows.

Zooming is not done with a scale, but with a different field of view in the gluPerspective call.

You have a glScale at a place where it affects the following transformations. Make sure you never have a non-uniform scale with that.
Check zoom == 1.0.
You need to read from the glVertex call upwards to get the OpenGL (left-multiplied) transformation hierarchy. The scale also affects the translations.