Transformation - PowerPoint PPT Presentation

1 / 41
About This Presentation
Title:

Transformation

Description:

Homogeneous Coordinates and Matrix Representation of 2D Transformations ... Nonplanar projections are needed for applications such as map construction ... – PowerPoint PPT presentation

Number of Views:91
Avg rating:3.0/5.0
Slides: 42
Provided by: yuf8
Category:

less

Transcript and Presenter's Notes

Title: Transformation


1
Transformation Projection
Proseminar Computer Graphics
  • Feng Yu

2
Transformations
  • What is a transformation?
  • What kind of transformations are there?
  • How can we compute them?

3
Transformation
  • 2D Transformations
  • Homogeneous Coordinates and Matrix Representation
    of 2D Transformations
  • Matrix Representation of 3D Transformations
  • Transformations as a Change in Coordinate System

4
2D Translations.
5
2D Scaling from the origin.
6
2D Rotation about the origin.
7
2D Rotation about the origin.
y
P(x,y)
P(x,y)
r
?
y
r
?
x
x
8
2D Rotation about the origin.
Substituting for r
Given us
9
2D Rotation about the origin.
Rewriting in matrix form gives us
10
Transformations.
  • Translation.
  • P?T P
  • Scale
  • P?S ? P
  • Rotation
  • P?R ? P
  • We would like all transformations to be
    multiplications so we can concatenate them ?
    express points in homogenous coordinates.

11
Homogeneous coordinates
  • Add an extra coordinate, W, to a point.
  • P(x,y,W).
  • Two sets of homogeneous coordinates represent the
    same point if they are a multiple of each other.
  • (2,5,3) and (4,10,6) represent the same point.
  • At least one component must be non-zero ? (0,0,0)
    is not allowed.
  • If W? 0 , divide by it to get Cartesian
    coordinates of point (x/W,y/W,1).
  • If W0, point is said to be at infinity.

12
Homogeneous coordinates
  • If we represent (x,y,W) in 3-space, all triples
    representing the same point describe a line
    passing through the origin.
  • If we homogenize the point, we get a point of
    form (x,y,1)
  • homogenised points form a plane at W1.

13
Translations in homogenised coordinates
  • Transformation matrices for 2D translation are
    now 3x3.

14
Concatenation.
  • We perform 2 translations on the same point

15
Concatenation.
Matrix product is variously referred to as
compounding, concatenation, or composition. This
single matrix is called the Coordinate
Transformation Matrix or CTM.
16
Homogeneous form of scale.
Recall the (x,y) form of Scale
In homogeneous coordinates
17
Concatenation of scales.
18
Homogeneous form of rotation.
19
3D Transformations.
  • Use homogeneous coordinates, just as in 2D case.
  • Transformations are now 4x4 matrices.
  • We will use a right-handed (world) coordinate
    system - ( z out of page ).

20
Translation in 3D.
Simple extension to the 3D case
21
Scale in 3D.
Simple extension to the 3D case
22
Rotation in 3D
  • Need to specify which axis the rotation is about.
  • z-axis rotation is the same as the 2D case.

23
Rotation in 3D
  • For rotation about the x and y axes

24
Transformations of coordinate systems.
25
Transform Left-Right, Right-Left
Transforms between world coordinates and viewing
coordinates. That is between a right-handed set
and a left-handed set.
26
Projections
  • Perspective Projection
  • Parallel Projection

27
Planar Geometric Projections
  • Standard projections project onto a plane
  • Projectors are lines that either
  • converge at a center of projection
  • are parallel
  • Such projections preserve lines
  • but not necessarily angles
  • Nonplanar projections are needed for applications
    such as map construction

28
Perspective Projection
29
Parallel Projection
30
Taxonomy of Planar Geometric Projections
planar geometric projections
perspective
  • parallel

2 point
1 point
3 point
multiview orthographic
axonometric
oblique
isometric
dimetric
trimetric
31
Orthographic Projection
  • Projectors are orthogonal to projection plane

32
Multiview Orthographic Projection
  • Projection plane parallel to principal face
  • Usually form front, top, side views

isometric (not multiview orthographic view)
front
in CAD and architecture, we often display three
multiviews plus isometric
side
top
33
Advantages and Disadvantages
  • Preserves both distances and angles
  • Shapes preserved
  • Can be used for measurements
  • Building plans
  • Manuals
  • Cannot see what object really looks like because
    many surfaces hidden from view
  • Often we add the isometric

34
Oblique Projection
  • Arbitrary relationship between projectors and
    projection plane

35
Advantages and Disadvantages
  • Can pick the angles to emphasize a particular
    face
  • Architecture plan oblique, elevation oblique
  • Angles in faces parallel to projection plane are
    preserved while we can still see around side
  • In physical world, cannot create with simple
    camera possible with bellows camera or special
    lens (architectural)

36
Perspective Projection
  • Projectors coverge at center of projection

37
Vanishing Points
  • Parallel lines (not parallel to the projection
    plan) on the object converge at a single point in
    the projection (the vanishing point)
  • Drawing simple perspectives by hand uses these
    vanishing point(s)

vanishing point
38
One-Point Perspective
  • One principal face parallel to projection plane
  • One vanishing point for cube

39
Two-Point Perspective
  • On principal direction parallel to projection
    plane
  • Two vanishing points for cube

40
Advantages and Disadvantages
  • Objects further from viewer are projected smaller
    than the same sized objects closer to the viewer
    (diminution)
  • Looks realistic
  • Equal distances along a line are not projected
    into equal distances (nonuniform foreshortening)
  • Angles preserved only in planes parallel to the
    projection plane
  • More difficult to construct by hand than parallel
    projections (but not more difficult by computer)

41
END
  • Thank you for your attentions
Write a Comment
User Comments (0)
About PowerShow.com