1 / 15

Arbitrary 3-D View-Plane

Arbitrary 3-D View-Plane. Two coordinate systems •World reference coordinate system (WRC) •Viewing reference coordinate system (VRC) First specify a viewplane and coordinate system (WRC) •View Reference Point (VRP) •View Plane Normal (VPN) •View Up Vector (VUP)

tehya
Download Presentation

Arbitrary 3-D View-Plane

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. Arbitrary 3-D View-Plane

  2. Two coordinate systems •World reference coordinate system (WRC) •Viewing reference coordinate system (VRC) First specify a viewplane and coordinate system (WRC) •View Reference Point (VRP) •View Plane Normal (VPN) •View Up Vector (VUP) Specify a window on the view plane (VRC) •Max and min u,v values ( Center of the window (CW)) •Projection Reference Point (PRP) •Front (F) and back (B) clipping planes (hither and yon) Specifying An Arbitrary 3-D View

  3. Specifying A View

  4. 1. Translate VRP to origin 2. Rotate the VRC system such that the VPN (n-axis) becomes the z-axis, the u-axis becomes the x-axis and the v-axis becomes the y-axis 3. Translate so that the CoP given by the PRP is at the origin 4. Shear such that the center line of the view volume becomes the z-axis 5. Scale so that the view volume becomes the canonical view volume: y = z, y = -z, x=z, x = -z, z = zmin, z = zmax Normalizing Transformation

  5. 1 0 0 -VRPx ) 0 1 0 -VRPy ) 0 0 1 -VRPz ) 0 0 0 1 ) 1. Translate VRP to origin

  6. We want to take u into (1, 0, 0) v into (0, 1, 0) n into (0, 0, 1) First derive n, u, and v from user input: n = VPN / ||VPN|| u = (Vup x n) / ||Vup x n|| v = n x u 2. Rotate VRC

  7. ux uy uz 0 ) vx vy vz 0 ) nx ny nz 0 ) 0 0 0 1 ) 2. Rotate VRC (cont.)

  8. 3. Translate so that the CoP given by the PRP is at the origin • 1 0 0 -PRPu ) • 0 1 0 -PRPv ) • 0 0 1 -PRPn ) • 0 0 0 1 )

  9. Center line of window lies along the vector [CW - PRP], this is the direction of projection, DoP. 4. Shear such that the center line of the view volume becomes the z-axis PRP

  10. ( (umax + umin)/2 ) ( PRPu ) CW = ( (vmax + vmin)/2 ) PRP= ( PRPv ) ( 0 ) ( PRPn ) ( 1 ) ( 1 ) ( (umax + umin)/2 - PRPu ) DoP = [CW-PRP] = ( (vmax + vmin)/2 - PRPv ) ( 0 - PRPn ) ( 1 ) The shear matrix must take this direction of projection and shear it to the z-axis , DoP' = [0, 0, DoPz]. Shear (cont.)

  11. ( 1 0 SHx 0 ) We want SH*DoP = DoP' SH = ( 0 1 SHy 0 ) ( 0 0 1 0 ) ( 0 0 0 1 ) ( 1 0 SHx 0 ) ( (umax + umin)/2 - PRPu ) (0) ( 0 1 SHy 0 ) ( (vmax + vmin)/2 - PRPv ) = (0) ( 0 0 1 0 ) ( 0 - PRPn ) (DoPz) ( 0 0 0 1 ) ( 1 ) (1) SHx = -DoPx/DoPz, SHy = -DoPy/DoPz Shear (cont.)

  12. y = v - v 5. Scale max min 2 z=-PRPn + F z= -PRPn + B z=-PRPn Y axis +1 y = -v + v max min Before Scale y= -z 2 Front Back Clipping Plane Clipping z=-1 Plane -Z -1 View plane y= z After Scale -1

  13. Scale is done in two steps: 1. First scale in x and y xscale = -2PRPn/(umax - umin) yscale = -2PRPn/(vmax - vmin) 2. Scale everything uniformly such that the back clipping plane becomes z = -1 xscale = -1 / (-PRPn + B) yscale = -1 / (-PRPn + B) zscale = -1 / (-PRPn + B) 5. Scale (cont.)

  14. (Sx 0 0 0 ) (0 Sy 0 0 ) (0 0 Sz 0 ) (0 0 0 1 ) 5. Scale (cont.) Sx = 2PRPn / [(umax - umin) (-PRPn + B)] Sy = 2PRPn / [(vmax - vmin) (-PRPn + B)] Sz = -1 / [(vmax - vmin) (-PRPn + B)]

  15. Nper = [Sper ][SHper ][T(-PRP) ][R ][T(-VRP)] Total Composite Transformation

More Related