1. General Pivot Point Rotation
or Rotation about Fixed Point
For it first of all rotate function is used. Sequences of
steps are given below for rotating an object about origin.
Translate object to origin from its original position as
shown in fig (b)
Rotate the object about the origin as shown in fig (c).
Translate the object to its original position from origin. It
is called as reverse translation as shown in fig (d).
2.
3. Scaling relative to fixed point
• Step1: The object is kept at desired location as shown
in fig (a)
• Step2: The object is translated so that its center
coincides with origin as shown in fig (b)
• Step3: Scaling of object by keeping object at origin is
done as shown in fig (c)
• Step4: Again translation is done. This translation is
called as reverse translation.
4.
5. Reflection
• Reflection is the mirror image of original object. In other words,
we can say that it is a rotation operation with 180°.
• In reflection transformation, the size of the object does not
change.
• The following figures show reflections with respect to X and Y
axes, and about the origin respectively.
•
6.
7.
8. Shear
• A transformation that slants the shape of an object is called the
shear transformation.
• There are two shear transformations X-Shear and Y-Shear.
• One shifts X coordinates values and other shifts Y coordinate
values.
• However; in both the cases only one coordinate changes its
coordinates and other preserves its values.
• Shearing is also termed as Skewing.
9. X-Shear
• The X-Shear preserves the Y coordinate and changes are
made to X coordinates, which causes the vertical lines to tilt
right or left as shown in below figure.
•
The transformation matrix for X-Shear can be represented as −
• Xsh=⎣100 shx10 001⎤
• Y' = Y + Shy . X
• X’ = X
10.
11. Y-Shear
• The Y-Shear preserves the X coordinates and changes the Y
coordinates which causes the horizontal lines to transform into
lines which slopes up or down as shown in the following figure.
• The Y-Shear can be represented in matrix from as −
• Ysh ⎢1shy0 010 001⎤
• X’ = X + Shx . Y
• Y’ = Y
12. Composite Transformation
• Composite transformation can be achieved by concatenation of
transformation matrices to obtain a combined transformation matrix.
• A combined matrix −
• [T][X] = [X] [T1] [T2] [T3] [T4] …. [Tn]
• Where [Ti] is any combination of
• Translation
• Scaling
• Shearing
• Rotation
• Reflection
13. • The change in the order of transformation would lead to
different results, as in general matrix multiplication is not
cumulative, that is [A] . [B] ≠ [B] . [A] and the order of
multiplication.
• The basic purpose of composing transformations is to gain
efficiency by applying a single composed transformation to a
point, rather than applying a series of transformation, one after
another.
14. • For example, to rotate an object about an arbitrary point (Xp,
Yp), we have to carry out three steps −
• Translate point (Xp, Yp) to the origin.
• Rotate it about the origin.
• Finally, translate the center of rotation back where it belonged
15.
16. • Step1: The object is kept at its position as in fig (a)
• Step2: The object is translated so that its center
coincides with the origin as in fig (b)
• Step3: Scaling of an object by keeping the object at
origin is done in fig (c)
• Step4: Again translation is done. This second
translation is called a reverse translation. It will position
the object at the origin location.
17. Interactive picture construction
techniques, Computer Graphics
• interactive picture- construction methods are commonly used in
variety of applications, including design and painting packages.
• These methods provide user with the capability to position
objects, to constrain fig. to predefined orientations or
alignments, to sketch fig., and to drag objects around the
screen.
• Grids, gravity fields, and rubber band methods are used to aid
in positioning and other picture construction operations.
• The several techniques used for interactive picture construction
that are incorporated into graphics packages are:
18. • 1) Basic positioning methods:- coordinate values supplied by
locator input are often used with positioning methods to specify
a location for displaying an object or a character string.
• Coordinate positions are selected interactively with a pointing
device, usually by positioning the screen cursor.
• (2) constraints:-A constraint is a rule for altering input
coordinates values to produce a specified orientation or
alignment of the displayed coordinates.
• the most common constraint is a horizontal or vertical alignment
of straight lines.
19. • (3) Grids:- Another kind of constraint is a grid of rectangular
lines displayed in some part of the screen area.
• When a grid is used, any input coordinate position is rounded to
the nearest intersection of two grid lines.
20. • (4) Gravity field:- When it is needed to connect lines at
positions between endpoints, the graphics packages convert
any input position near a line to a position on the line.
• The conversion is accomplished by creating a gravity area
around the line.
• Any related position within the gravity field of line is moved to
the nearest position on the line.
• It illustrated with a shaded boundary around the line.
21. • (5) Rubber Band Methods:- Straight lines can be constructed
and positioned using rubber band methods which stretch out a
line from a starting position as the screen cursor.
• (6) Dragging:- This methods move object into position by
dragging them with the screen cursor.
22. • (7) Painting and Drawing:- Cursor drawing options can be
provided using standard curve shapes such as circular arcs and
splices, or with freehand sketching procedures. Line widths, line
styles and other attribute options are also commonly found in
painting and drawing packages.
•