OBJECTS TRANSFORMATION
We will begin with a detailed explanation of the affine transformations, althought some lines have been written already in relation with this item.
In total, there are 14 possible affine transformations, that can be grouped in four unities: rotations, scaling, shearing and translations. They will be explained in this order.
There are four possible rotations, three around any of the coordinate axis and one more around an axis created by the user. This last one is very important, so its "way of working" will be explained already. First of all, it is needed to know how to create an axis. For doing so, the second button from top and left side in the general toolbar, must be clicked. Then the mouse must be clicked over the canvas and dragged as if it were a normal right line. It will be seen a blue line appear that correspond to the "selected" axis. When the right mouse button is clicked, the blue line changes to a green one, that correspond to "non-selected" axis. One point must be mentioned: When the "axis-button" is clicked the cursor of the mouse will not change to a cross-hair until the screen is clicked.
Once the axis is created, any "rotable" object on the screen, can be selected and choosing the amount of rotation with the "big" slider, rotated in the usual way, clicking in "Axis rotation" on the transformation window.
Done in this way, the rotation will be a "real" 3-D rotation, but as long as the 3-D capabilities are not used, what will be obtained is the projection of the object in space over the screen. This is useful as it is very easy to change a bezier-circle to an ellipse knowing that the big axis of this last will be in the direction of the rotation axis. The small axis of the ellipse will be the product of the radius of the original circle multiplied by the cosine of the angle rotated. For example, if an axis at 45 degrees wiht the horizontal is drawn and an angle of 60 degrees is chosen for the rotation, and if a circle is rotated it will be obtained an ellipse with its bigger axis equal to the one of the circle and forming an angle of 45 degrees with the horizontal. The smaller axis, perpendicular to the bigger, will have a length of "cos(60)=1/2" times the bigger one. So, one half.
This behavior of rotations is exactly the same for rotations around the "X" and "Y" axis, the only difference being their directions and the fact that those last are performed around the center of the objects or groups. Not so in the former case if the "special" axis doesn't cut the center. A rotation around the "Y" axis of 60 degrees will change a circle to a vertical ellipse with the same vertical axis as the circle and the same directions but one half in length, of the horizontal axis. But there will be no translation. On the contrary, a "special-vertical-axis" at the side of a circle will create the same ellipse but translated. One final point about affine rotations must be mentioned: they cannot be applied to text althought they could be, so, this is something to be stablish in the future. For normal, usual rotations of text the "direct" method is employed: rotate by hand their support line.
Probably, the most interesting or useful rotation is the one around the "Z" axis, so, in the plane of the canvas. It is the "typical" rotation in 2-D and it must be remembered that the positive rotation in METAGRAF's axis is clockwise.
The second group of affine transformations includes the general scaling, the horizontal or vertical one and the scaling acording with the perpendicular direction to the screen of no practical use in 2-D. Those transformations are really straight forward and almost nothing must be said about them. Nevertheless, there is a very important point that must be mentioned and it is related with text. All changes in text size are done trough scaling. And this is true for tex fonts and/or postscript fonts, in all their possible aspects, so, including mathematical symbols and formulae. A few test with some written text will show how it works and the results. (It will be explained in detail in due chapter).
The third group of affine transformations is related with shear. Any "transformable" object , including text, can be shared in the "X", "Y" or "Z" directions (the last one without practical interest). Any other shear can be made superimposing a shear trough the first two axis. The shear is produced in such a way that with positive amounts of shear in "X" direction, will produce a rotation of a vertical line in counterclockwise way. So, it is usual, if forgotten this point, to have some surprise when looking trough ghostview the picture created. And, specially, if some "slanted-text" was tried. It must not be forgotten to click the "+/-" button of the slider when doing this. (Anyway, to correct it is the easiest thing).
Finally, the last group of affine transformations is the simplest one: translations. Usually of little use in 2-D they are very important if some object is wanted with some special position with respect to the "Z" axis. In 2-D, practically all translations are done by direct manipulation with the mouse or arrow-keys.
Before ending this chapter some precissions are needed. The first one is that it is NOT recommended to try any scaling of text before reading the specific chapters. The scale is different as for other objects and inconsistent results will be obtained. Another point is the need to mention that some objects dont accepts affine transformations. Special mention must be made of the ARC object. It accept some simple transformations, as general scaling and rotation around the "Z" axis, but not 3-D involved transformations. The same can be said regarding the spiral object, although significant transformations can be done (only to be seen with ghostview or in final draw but not in screen). It will be mentioned the possibility of scaling along "X" or "Y" axis and rotate around "Z" axis.