Transformations

Scaling

glScalef(GLfloat x, GLfloat y, GLfloat z)

Scales subsequent objects by the factor x in the X direction, y in the Y direction, and z in the Z direction.

A uniform scale - changing the size of an object without distorting it - is done with x = y = z.

Uniform


Non-uniform

Scaling is done relative to the origin - if an object is not centered around the origin, it will appear to move away from it.


next