6.2Dtform
[prev][next]

Translation


Translation

x' = x + tx
y' = y + ty


Translation

x' = x + tx
y' = y + ty

In matrix form:
P' = P + T
where T =[tx
ty
]

Repeat transformation for each point in figure (rigid body transformation)



Scaling

x' = x * sx
y' = y * sy


Scaling

x' = x * sx
y' = y * sy

In matrix form:
P' = S.P
where S = [sx 0
0 sy
]



Uniform and Nonuniform Scaling

S1 = [2 0
0 2
]
S1 = [3 0
0 0.5
]


Rotation


Rotation

x' = r cos[theta]
y' = r sin[theta]


Rotation

x' = x cos[theta] - y sin [theta]
y' = x sin[theta] + y cos [theta]

In matrix form:
P' = R.P
where
R = [cos[theta] -sin[theta]]
sin[theta]cos[theta]



Homogeneous Coordinates

Want to do all standard transformations as matrix multiplications

P=[x
y
] => [x/h
y/h
1
] or [x
y
h
]


Composite Transformations

Translation

P' = T2.T1.P = T(tx2, ty2).T(tx1, ty1).P
= T(tx2 + tx1, ty2 + ty1).P


Composite Transformations

Rotation

P' = R([theta]2).R([theta]1).P = R([theta]2 + [theta]1).P


Composite Transformations

Scaling

P' = S(sx2, sy2).S(sx1, sy1).P
= S(sx2 + sx1, sy2 + sy1).P



General Pivot Point Rotation

A transformation sequence for rotating an object about a specified pivot point using the rotation matrix

Original Position of Object and Pivot Point
Translation of Object so that Pivot Point is at Origin
Rotation about Origin
Translation of Object so that Pivot Point is Returned to original Position

P' = T(xr, yr) . R([theta]) . T(-xr, -yr) . P



General Pivot Point Scaling

A transformation sequence for scaling an object with respect to a specified fixed position using the scaling matrix

Original Position of Object and Fixed Point
Translation of Object so that Fixed Point is at Origin
Scale Object with Respect to Origin
Translation of Object so that Fixed Point is Returned to original Position

P' = T(xr, yr) . S . T(-xr, -yr) . P



General-Scaling Direction


General-Scaling Direction


General-Scaling Direction

  • Rotate scaling direction to axis
  • Scale
  • Rotate back


Order of Transformations

P' = R . T . P


Order of Transformations

P' = T . R . P



The Two-dimensional Viewing-transformation Pipeline


The Two-dimensional Viewing-transformation Pipeline



World-to-Viewing Coordinate Transform


World-to-Viewing Coordinate Transform


World-to-Viewing Coordinate Transform


World-to-Viewing Coordinate Transform


World-to-Viewing Coordinate Transform



The Two-dimensional Viewing-transformation Pipeline


The Two-dimensional Viewing-transformation Pipeline

(1) Scale with fixed point of (xwmin, ywmin)


The Two-dimensional Viewing-transformation Pipeline

(1) Scale with fixed point of (xwmin, ywmin)

(2) Translate scaled window to viewport position







[prev][next]
Made by dynaPage 0.2