Viewing parameters
Download
1 / 20

Viewing Parameters - PowerPoint PPT Presentation

Viewing Parameters View plane: plane of our display surface View reference point (VRP): center of attention, all other viewing parameters are expressed relative to this point View plane normal (VPN): look direction View distance: distance from camera to VRP

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha

Download Presentation

Viewing Parameters

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Viewing parameters l.jpg
Viewing Parameters

  • View plane: plane of our display surface

  • View reference point (VRP): center of attention, all other viewing parameters are expressed relative to this point

  • View plane normal (VPN): look direction

  • View distance: distance from camera to VRP

  • View-up direction: vector pointing to top of camera

  • View plane coordinates: film coordinates

  • object coordinates: coordinates that the objects lie

240-422 Computer Graphics : Viewing in 3D_4


Viewing parameters2 l.jpg
Viewing Parameters

240-422 Computer Graphics : Viewing in 3D_4


Conversion to view plane coordinates l.jpg
Conversion to View Plane Coordinates

  • We wish to perform a series of transformations which will change the object coordinates into the view plane coordinates.

  • First step: translate the origin to the correct position for the view plane coordinate system (shifting to VRP then shifting along the VPN by the VIEW-DISTANCE.

  • Second step: align the z axis

240-422 Computer Graphics : Viewing in 3D_4


3d rotation about an arbitrary axis l.jpg
3D Rotation about an Arbitrary Axis

1.Translate the axis to origin

2. Rotate about x until the axis of rotation is in the xz plane

3. Rotate about y axis until the z axis corresponds to the axis of rotation

4. Rotate about z (axis of rotation)

5. Reverse the rotation about y

6. Reverse the rotation about x

7. Reverse the translation

240-422 Computer Graphics : Viewing in 3D_4


Graphical illustrations l.jpg
Graphical Illustrations

240-422 Computer Graphics : Viewing in 3D_4


Mathematical illustrations l.jpg
Mathematical Illustrations

  • Suppose the rotation axis is defined by a point (x1, y1, z1) and a vector [A B C], so the line equations are

    x = Au + x1

    y = Bu + y1

    z = Cu + z1

  • The initial translation matrix and its reverse translation are

240-422 Computer Graphics : Viewing in 3D_4


Mathematical illustrations7 l.jpg
Mathematical Illustrations

  • Rotation about x axis

V = (B2+C2)1/2

sin(I) = B/V

cos(I) = C/V

y

y

(A, B, C)

(0, B, C)

(0, B, C)

B

V

x

x

I

C

z

z

240-422 Computer Graphics : Viewing in 3D_4


Mathematical illustrations8 l.jpg
Mathematical Illustrations

  • Rotation matrix, Rx

  • Reverse matrix, Rx-1

240-422 Computer Graphics : Viewing in 3D_4


Mathematical illustrations9 l.jpg
Mathematical Illustrations

  • Rotation about y

y

L = (A2+B2+C2)1/2

V = (L2-A2)1/2=(B2+C2)1/2

sin(J) = A/L

cos(J) = V/L

A

x

J

L

V

z

Rotation axis

240-422 Computer Graphics : Viewing in 3D_4


Mathematical illustrations10 l.jpg
Mathematical Illustrations

  • Rotation matrix, Ry

  • Reverse matrix, Ry-1

240-422 Computer Graphics : Viewing in 3D_4


Mathematical illustrations11 l.jpg
Mathematical Illustrations

  • Rotation about the z axis

  • The actual transformation for a rotation about an arbitraty axis is given by

    R = T-1 Rx-1 Ry-1 Rz Ry Rx T

240-422 Computer Graphics : Viewing in 3D_4


Back to view plane coordinates conversion l.jpg
Back to “View Plane Coordinates Conversion”

  • Parameters:

    VPR = (xr, yr, zr)

    VPN = [Nx, Ny, Nz]

    View-up = [xup, yup, zup]

    View-distance = VD

  • The entire transformation is

    TMATRIX = Rz Ry Rx T

240-422 Computer Graphics : Viewing in 3D_4


Mathematical illustrations13 l.jpg
Mathematical Illustrations

V=(Ny2 + Nz2)1/2

240-422 Computer Graphics : Viewing in 3D_4


Mathematical illustrations14 l.jpg
Mathematical Illustrations

240-422 Computer Graphics : Viewing in 3D_4


Clipping in 3d l.jpg
Clipping in 3D

  • Clipping against planes, not against lines as in 2D

Front plane clipping

Back plane clipping

Top plane clipping

Bottom plane clipping

Left plane clipping

Right plane clipping

Clipping Process

240-422 Computer Graphics : Viewing in 3D_4


3d clipping l.jpg
3D Clipping

  • Fig 8-38, 8-39, 8-40

240-422 Computer Graphics : Viewing in 3D_4


3d clipping17 l.jpg
3D Clipping

240-422 Computer Graphics : Viewing in 3D_4


Front and back clipping l.jpg
Front and Back Clipping

  • for the point (x1, y1, z1) to be visible:

    z1<= FRONT-Z and z1 >= BACK-Z

240-422 Computer Graphics : Viewing in 3D_4


3d viewing transformation summary l.jpg
3D Viewing Transformation Summary

1.Draw object in the object coordinates

2.Specify viewing parameter (VPR, VPN, VD, etc.)

3.Convert object coordinates to view plane coordinates

4.Perform 3D clipping

5.Project the objects in viewing onto the view plane

240-422 Computer Graphics : Viewing in 3D_4


3d application flight simulator l.jpg
3D Application: Flight Simulator

  • Fig 8-45, 8-46

240-422 Computer Graphics : Viewing in 3D_4


ad
  • Login