3-D Graphics - PowerPoint PPT Presentation

About This Presentation
Title:

3-D Graphics

Description:

Specify the view plane in world coordinates. COP or DOP. View volume in world coordinate system. ... We need to transform the world coordinate to view ... – PowerPoint PPT presentation

Number of Views:18
Avg rating:3.0/5.0
Slides: 12
Provided by: gurp2
Category:
Tags: dop | graphics

less

Transcript and Presenter's Notes

Title: 3-D Graphics


1
3-D Graphics
Part I
3-D Viewing
2
  • 3-D viewing of object can be done by
    following steps
  • Specify the view plane in world coordinates
  • COP or DOP
  • View volume in world coordinate system.
  • Clipping in 3D

3
Specifying the View Plane
  • We need to transform the world coordinate to
    view coordinate for that we need to specify the
    view plane. A view plane can be specified by
  • View reference point (in the world coordinate)
  • a point on the plane
  • the origin of the View Reference Coordinate
    system
  • View plane normal VPN (in the world coordinate)
  • View-up vector VUP (in the world coordinate)

4
Specifying the View Plane
5
Specifying the View Plane
Let R0 (x0,y0,z0) is the reference point of view
plane N (n1in2jn3k) is a unit normal vector ie.
N 1 Up is a up vector specifying the up
position of camera.
By projecting Up vector on the view plane we get
direction of y axis of view plane.
y
Up
vy
vx
N
R0 (x0,y0,z0)
x
z
6
As shown in figure, using the addition property
of the vectors we have VykNUp VyUp-kN
---------I Multiply both side by N we get
Vy.NUp.N-kN.N Up.N-kN2
0Up.N-k or kUp.N (vy.N0 and n1)
Put this value of k in I we get
VyUp-(N.Up)N Or unit vector that defines the
direction of y axis is given as vy/ vy Lets
name it Jv
7
Specifying the View Plane
After finding the direction of y axis, direction
of x axis of view plane can be obtained by the
cross product of N and Jv I.e. vx N X Jv Or
unit vector that define the direction of ve x
axis is given as N X Jv / N X Jv . Lets call
this Iv. If left handed coord. System is chosen
then N points away from the observer i.e. ve z
axis is away from the observer. The world coord.
is right hand coordinate system where ve z axis
points toward the observer.
8
Once the view reference coordinate system is
defined, the next step is to project the 3D world
on to the view reference plane
But before that, convert a point from world
coordinate system to view coordinate system
because for projecting the object on view plane,
the coordinates of object must be specified with
respect to view plane coordinates.
9
Transformation from world to view port coord.
system
The transformation can be achieved by following
sequence
  1. Translate the view reference point to the origin
    of world coordinate system.
  2. Apply rotations to align vx,vy and N with x,y,z
    axes respectively.

Translation can be done by using Ttr matrix
10
The rotation sequence can require upto 3
coordinate axis rotations, if the N is not
aligned with any of the coordinate axis. The
orientation can be done by transformation
sequence Rz.Ry.Rx i.e. First rotate around x axis
then around y axis and then around z axis. The
rotation matrix can be defined in terms of unit
vectors Iv, Jv and N as follow
Where u1,u2,u3 are components of Iv v1,v2,v3
are components of Jv n1,n2,n3 are components of N
11
The complete world to view transformation matrix
is obtained by Mwc,vc R.Ttr This matrix is
multiplied with coord. description of the object
to transfer them to the view coordinate system.
Problem Find View corrd. of point P(1,1,1) in
world coord. Given that R0(2,2,3),
Up0i0j1k and N v3 / 2 I 1/2 j 0 k.
Write a Comment
User Comments (0)
About PowerShow.com