You can expect Test 2 (on Friday, November 7) to contain problems similar to some of these.
Representing transformations as matrices is particularly convenient, because a single matrix can represent a ________ of transformations.
When you try this program, you find that it seem to work: you get a perspective view of an object drawn with center (0.5, 0.5, -3.). Still, Egbert’s reasoning has a flaw. What is it?glMatrixMode(GL_PROJECTION); glLoadIdentity(); glFrustum(-1., 1., -1., 1., 1., 10.); glTranslated(0.5, 0.5, -3.);
( |
|
) | . |
( |
|
) | . |
Depending on the context, you may also wish to do “glLoadIdentity();” just before the transformation commands above.glPushMatrix(); glTranslated(2., 3., 4.); glScaled(5., 5., 5.); drawsphere(); glPopMatrix();
glTranslated( 1., 2., 3.); glScaled(2., 2., 2.); glTranslated(-1., -2., -3.);