Presentation is loading. Please wait.

Presentation is loading. Please wait.

Projection v VP u VPN n.

Similar presentations


Presentation on theme: "Projection v VP u VPN n."— Presentation transcript:

1 Projection v VP u VPN n

2 Projection v VRP u VRP n Eye Point

3 Camera & World Up Vector Look At Vector

4 Orthographic Projection
View Plane Back Clipping Plane VPN Front Clipping Plane

5 In OpenGL glOrtho(GLdouble left, GLdouble right, GLdouble bottom,
GLdouble top, GLdouble near, GLdouble far) far The direction of projection is parallel to Z-axis. Looking at the negative direction near top left Back Clipping Plane VPN right bottom Front Clipping Plane

6 Perspective Projection
View Plane Back Clipping Plane VPN Front Clipping Plane

7 In OpenGL glFrustum(GLdouble left, GLdouble right, GLdouble bottom,
GLdouble top, GLdouble near, GLdouble far) far The direction of projection is parallel to Z-axis. Looking at the negative direction near top left VPN right Back Clipping Plane bottom Front Clipping Plane

8 In OpenGL gluPerspective(GLdouble fovy, GLdouble aspect,
GLdouble near, GLdouble far) far The direction of projection is parallel to Z-axis. Looking at the negative direction. Aspect = w/h near w VPN h Back Clipping Plane fovy Front Clipping Plane

9 gluLookAt gluLookAt(GLdouble eyex, GLdouble eyey, GLdouble eyez,
GLdouble latx, GLdouble laty, GLdouble latz, GLdouble upx, GLdouble upy, GLdouble upz) The direction of projection is parallel to Z-axis. Looking at the negative direction. Aspect = w/h far near up w VPN h Back Clipping Plane fovy lat Front Clipping Plane

10 Parallel Projection

11 Parallel Projection (x,y,d) x z y (x,y,z) d (x,y,z) (x,y,d)

12 Perspective Projection

13 Perspective Projection
xp=x(zprp – zvp)/ (zprp – z) View Plane yp=y(zprp – zvp)/ (zprp – z) (x,y,z) dp=(zprp – zvp) (xp,yp,zvp) zprp dp

14 Perspective Projection
xp=x(zprp – zvp)/ (zprp – z) yp=y(zprp – zvp)/ (zprp – z) dp=(zprp – zvp) x y z 1 xh yh zh h zvp/dp zvp(zprp/dp) /dp zprp/dp = h = (zprp-z/dp) xp=xh/h yp=yh/h

15 Graphics Pipeline Modeling Coordinates World Coordinates Viewing
Transformation Viewing Transformation Viewing Coordinates Projection Coordinates Projection Transformation Normalization Transformation Normalized Projection Coordinates Device Coordinates Workstation Transformation


Download ppt "Projection v VP u VPN n."

Similar presentations


Ads by Google