280 likes | 408 Views
3D Viewing. Perspective Projections. Single Point Perspective. COP on X-axis. COP (-1/p 0 0 1) VP x (1/p 0 0 1). 3D Viewing. Perspective Projections. Two Point Perspective. 3D Viewing. Perspective Projections. Three Point Perspective. 3D Viewing. Perspective Projections. Y. X. Z.
E N D
3D Viewing Perspective Projections Single Point Perspective • COP on X-axis • COP (-1/p 0 0 1) VPx (1/p 0 0 1)
3D Viewing Perspective Projections Two Point Perspective
3D Viewing Perspective Projections Three Point Perspective
3D Viewing Perspective Projections
Y X Z 3D Viewing Vanishing Points • Two ways • Intersection of transformed lines • Transformation of points at infinity Y VPz VPx X
3D Viewing Plane Geometric Projections • Parallel • Perspective • Single Point • Orthographic • Axonometric • Oblique • Two Point • Trimetric • Dimetric • Isometric • Three Point • Cavalier • Cabinet
Y X Z 3D Viewing Implementation Issues More from Interface point of view V Eye U N • Viewing Coordinate System (VCS) • World Coordinate System • (WCS)
3D Viewing View Coordinate System (VCS) • Viewing coordinate system • Position and orientation of the view plane • Extent of the view plane (window) • Position of the eye • View Plane • View Reference Point (VRP): the origin of VCS specified as (rx , ry, rz) in WCS: center of the scene • Normal to the view plane (nx , ny, nz )
Z r Y X 3D Viewing View Coordinate System (VCS) • View Plane • Normal Direction (View Plane Normal VPN) n (nx ,ny ,nz) • User may provide normalized vector • e.g. • nx = sin cos • ny = sin sin • nz = cos
3D Viewing View Coordinate System (VCS) • View Plane • Direction v • v is a unit vector intuitively corresponding to “up” vector • “up” vector is specified by the user in WCS up’ = up – (up.n)n v = up’ / |up’| up’ up n v • Direction u • u = n x v ( Left Handed)
wr wt n v u e wl wb 3D Viewing View Coordinate System (VCS) • Window and Eye • Window : left, right, bottom,top (wl,wr,wb,wt) • generally is centered at VRP (origin) • Eye : e = (eu,ev,en) • Typically e = (0,0,-E)
3D Viewing Transformation from WCS to VCS v Y (x, y) O’ u r O X
3D Viewing Transformation from WCS to VCS • Point object is represented as • (a,b,c) in VCS • (x,y,z) in WCS
3D Viewing Transformation from WCS to VCS • Conversion from one coordinate system to another • Therefore a=(p-r).u, b=(p-r).v, c=(p-r).n
3D Viewing Transformation from WCS to VCS • In Homogenous Coordinates • (a,b,c,1) = (x,y,z,1) Awv
3D Viewing Transformation from WCS to VCS • In Homogenous Coordinates • r’= -rMT = (-r.u,-r.v,-r.n) = (rx’,ry’,rz’) • puvn=pxyzAwv
p t=1 u n p* v p (pu,pv,pn) t=t’ e e t=0 p*(u*,v*) 3D Viewing Transformation from VCS to View Plane Parametrically r(t) = e(1-t)+p.t
3D Viewing Transformation from VCS to View Plane On u-v plane, r(t)n = 0
3D Viewing Transformation from VCS to View Plane When eye is on n-axis eu=ev=0 u*=pu/(en-pn), v*=pv/(en-pn) Matrix form (n*=0) Perspective Transformation
3D Viewing Transformation from VCS to View Plane Using Perspective Transformation Mp
3D Viewing Transformation from VCS to View Plane If eye is off n-axis we have another matrix p*=(pu,pv,pn,1)MsMp q : in WCS maps to p*=qAwvMsMp
3D Viewing View Volume Eye View Plane, n=0 Front Plane n=F Back Plane n=B
3D Viewing View Volume v v wt wt n n F B wb wb F/(1-F/en) B/(1-B/en)
v 1 Vt Vb 0 u Vl Vr 3D Viewing Volume Normalization Transformation
3D Viewing Volume Normalization Transformation For n no nt F/(1-F/en) B/(1-B/en) 0 1 Scaling sn Translation rn
3D Viewing Volume Normalization Transformation where Total Transformation: AwvMsMpN