Modeling Transform vs. Viewport Transform
Transforms: |
|
As Modeling Transform: |
As Viewport Transform: |
Transforms: |
|
As Modeling Transform: |
As Viewport Transform: |
The point of this demo is to help you to understand the equivalence between modeling transformations and coordinate transformations. Modeling transforms apply to objects; they scale, rotate, and move objects. Coordinate transforms scale, rotate, and move the viewport, where the viewport is the rectangle that encloses the region that is shown in the image.
At the top left in the demo is an image showing several objects. The sliders to the right allow you to control some transformations that are applied to the image. But are they applied to the objects in the image as modeling transforms, or are they applied to the viewport that picks out the part of the plane that is visible in the image?
The two lower pictures will help you understand that the question can't really be answered, because of the equivalence between the two types of transformation. Note that in all the pictures, the origin (0,0) has been translated to the center of the picture, so that scaling and rotation are about the center point.
In the two lower pictures, the transparent gray square represents the viewport. It encloses the part of the image that is visible in the upper picture. On the lower left, the viewport remains untransformed, while the objects are transformed. On the lower right, the objects remain untransformed, while the viewport is transformed. You can see that in both cases, the content of the viewport is exactly what you see in the image on the upper left. Admittedly, the "modeling transform" version might be easier to understand, but the "viewport transform" version is equally valid.
Remember that the effect of a transform on the viewport is the opposite of its effect on objects. For example, a modeling transform that rotates an object clockwise will rotate the viewport counterclockwise. And translating the objects to the right is equivalent to translating the viewport to the left. You should take note of this effect as you drag the sliders.