1 / 35

Projection

Projection. Modelview Matrix. Viewing Transform. Model Transform. world coordinates. Pipeline Review. Focus of this lecture. Review (Lines in R 2 ). Parallel Projection. Projection (R 2 ). viewline. viewpoint. Perspective Projection. ~. ~. Parallel Projection. ~. ~.

mdarryl
Télécharger la présentation

Projection

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Projection

  2. Modelview Matrix Viewing Transform Model Transform world coordinates Pipeline Review Focus of this lecture

  3. Review (Lines in R2)

  4. Parallel Projection Projection (R2) viewline viewpoint

  5. Perspective Projection ~ ~

  6. Parallel Projection ~ ~

  7. Projection (R3) See handout for proof!

  8. Example Vertices (0,0,0), (2,0,0), (2,3,0), (0,3,0) (1,1,1), (1,2,1) Parallel projection: onto z = 0 plane v = (0,0,1,0)T, n = (0,0,1,0)T

  9. Vertices (0,0,0), (2,0,0), (2,3,0), (0,3,0) (1,1,1), (1,2,1) Perspective projection: onto z = 0 plane from viewpoint (1,5,3) v = (1,5,3,1)T, n = (0,0,1,0)T

  10. Viewplane Coordinate Mapping p” p’ O

  11. K4×3 Determine Viewplane Transform by Homogeneous Transformation

  12. L L L: left inverse of K

  13. Viewplane origin (1,2,0) u-axis (3,4,0) v-axis (-4,3,0) Example

  14. Orthographic Projection • Def: direction of projection  viewplane … is a parallel projection n v

  15. Direction cosine (ref) Foreshortening ratio = (length of projected segment)/(length of original segment) Definitions

  16. If the direction cosines of the plane normal (in world coordinate system) are n1, n2, and n3, the foreshortening ratios in the x-, y-, and z- directions are (n22 + n32)1/2, (n12 + n32)1/2, and (n12 + n22)1/2, respectively. Front, side, top views: n = (1,0,0,0), (0,1,0,0), or (0,0,1,0) as in engineering drawings Theorem

  17. Types of Orthographic Projections • Axonometric projections: attempts to portray general 3D shape • Isometric projection: all foreshortening ratio are the same • Dimetric projection: exactly two are the same • Trimetric projection: all foreshortening ratio are different

  18. Axonometric Projections Isometric Dimetric Trimetric f: foreshortening ratios

  19. Example (Dimetric)

  20. Oblique Projection • A particular parallel projection where direction of projection is not perpendicular to viewplane n Oblique projection not available in OpenGL v

  21. Cavalier Projection p/4 n v viewplane Properties: Lines  viewplane have f = 1 Planar faces  viewplane appear thicker

  22. Cabinet Projection n f = arccot(2) v Properties: To overcome ‘thickness’ problem, choose f viewplane to be 1/2

  23. A perspective projection maps parallel lines in the space to parallel lines in the viewplane IFF the lines are parallel to the viewplane. Perspective Projection

  24. Otherwise, they meet

  25. Vanishing Point • Suppose (xi, yi, zi) i =1,2,3 are a set of mutually perpendicular vectors. The viewplane normal (n1, n2, n3) of a perspective projection can be perpendicular to (a) none (b) one (c) two of the vectors. n n (a) (b) (c) n

  26. Vanishing Point • If a perspective projection maps a point-at-infinity (x,y,z,0) to a finite point (x’,y’,z’,1) on the viewplane, the lines in the direction (x,y,z) appear as lines converging to point on the (Cartesian) viewplane. The point (x’,y’,z’) is called the vanishing point in the direction (x,y,z).

  27. Three-point perspective Vanishing point Two-point perspective One-point perspective

  28. IMAGE FORMATION – Perspective Imaging “The Scholar of Athens,” Raphael, 1518 Image courtesy of C. Taylor

  29. Example • Determine (and verify it is indeed so) the vanishing point of an OpenGL setting. Eye = [15,0,0] Eye = [15,0,15]

  30. Numeric Example Viewpoint (15,0,15,1) Viewplane: x + z + 1 = 0 How about (1,0,1,0)?

  31. Projection Parallel projection Perspective projection Parallel projection Orthographic Isometric Dimetric Trimetric Oblique Cavalier Cabinet Perspective projection Three-point perspective Two-point perspective One-point perspective Summary Understand how they are differentiated

  32. Fig. 8. Constructing a perspective image of a house. (a) Drawing the floor plan and defining the viewing conditions (observer position and image plane). (b) Constructing a perspective view of the floor. (c) A reference height (in this case the height of an external wall) is drawn from the ground line and the first wall is constructed in perspective by joining the reference end points to the horizontal vanishing point v2. (d) All four external walls are constructed. (e) The elevations of all other objects (the door, windows and roofs) are first defined on the reference segment and then constructed in the rendered perspective view.

  33. Exercise • Hand sketch a perspective drawing of a house • Use Maxima to compute 2-point perspective projection, setting viewplane coordinate system

  34. Cross ratio is preserved in projective geometry (ratio is NOT preserved) Cross Ratio The cross-ratio of every set of four collinear points shown in this figure has the same value z2 z3 z4 z1

More Related