|
| ||||
1. IntroductionAn affine transform changes the relationship between the coordinate system a program uses to draw and the coordinate system used to display. For example: the top image at left represents what a piece of code drew: a 24 point M at the location 0,0. (The green lines show you the axes and tic marks every 10 units.) The bottom image shows what that drawing looks like when drawn into Graphics2D after a 30 degree rotation has been applied. The code to draw the bottom 'M' would look something like:
Notice how the drawing operations ( There are several other common operations on coordinate systems:
In each case, the drawing commands are the same. It is the affine transform - either a rotate, a translation, a scale, or a shear - that causes the output on the display to be pivoted, slid over, enlarged, or skewed. These basic transform types can be combined in dizzying ways to produce transforms that produce truly weird results. For example, the image at right was drawn with the following code:
Click on the image to see an animation of the transforms being combined. This animation is available on all the small applets in these pages. |
|
|
| |||||||