University Palestine: Three Dimensional Viewing
University Palestine: Three Dimensional Viewing
Computer Graphics
ITGD3107
Presentation name :
Dr. Sana'a
p_16_10 @hotmail.com it4ever2008 @hotmail.com 1
Contents 3D Viewing Camera Analogy Viewing Pipeline Camera Modeling w/ OpenGL Projections Types of Projections Perspective Projection Parallel Projection Projection Matrix Projection of Lines 3D Viewing with OpenGL Matrix Modes Three Dimensional Viewing
p_16_10 @hotmail.com it4ever2008 @hotmail.com
3D Viewing
The steps for computer generation of a view of a three dimensional scene are somewhat analogous to the processes involved in taking a photograph.
Camera Analogy
1. 2. 3.
Orientation
Viewing Pipeline
The general processing steps for modeling and converting a world coordinate description of a scene to device coordinates:
Viewing Pipeline
1.
Construct the shape of individual objects in a scene within modeling coordinate, and place the objects into appropriate positions within the scene (world coordinate).
Viewing Pipeline
World coordinate positions are converted to viewing coordinates.
Viewing Pipeline
Convert the viewing coordinate description of the scene to coordinate positions on the projection plane.
Viewing Pipeline
Positions on the projection plane, will then mapped to the Normalized coordinate and output device.
10
11
Coordinate Systems
World Coordinate System-This is object space or the space in which the application model is defined. Screen Coordinate System-The space in which the image is displayed. World Window (or clipping)-This is the rectangle in the world defining the region that is to be displayed. Viewport-The rectangular portion of the interface window that defines where the image will actually appear (usually the entire interface window but in some cases modified to be a portion of the interface window). Viewing Transformation-The process of mapping a world window in World Coordinates to the Viewport.
12
13
Projection plane
1. Projection plane called the view plane in computer graphics 2. It is defined by a point called view reference point (VRP) and a normal (a vector perpendicular to the plane) called view plane normal (VPN).
14
Viewing Coordinates
View Reference point: It is the center of viewing coordinate system. It is chosen to be close to or on surface of object in a scene. View Plane normal vector: This normal vector is in a direction perpendicular to view plane. View Distance: It is the distance from view plane to view reference point.
15
16
Projections
Once the view volume is determined, a projection transformation will convert the object in the 3D view volume to a 2D image on the projection plane.
17
Types of Projections
Perspective Projection
Parallel Projection
18
Give a realistic view of 3D objects, but does not preserve shape of object or scale Perspective images of parallel lines not parallel with projection plane converge to a point called vanishing point or projection reference point. Size of object is diminished with distance Used in architectural, engineering, industrial design, and advertising drawings
19
1-point perspective
Most popular
2-point perspective
3-point perspective
20
Parallel Projection
Accurate and same-scale measurements Not realistic, and may require multiple projections to get a complete feeling of the object
21
Orthographic Projection
Projectors are orthogonal to projection surface
22
Multiview Orthographic Projection 1. Projection plane parallel to principal face 2. Usually form front, top, side views
23
Axonometric Projections
Allow projection plane to move relative to object
24
25
Oblique Projections
Projectors not orthogonal to projection plane The projection plane is typically parallel to a face of the object Classified by the angle between projector and plane Pi/4: Cavalier type Preserves the lengths of edges orthogonal to projection plane. Cavalier: 45 degree ArcTan(2): Cabinet type Halves the lengths of edges orthogonal to projection plane Cabinet: arctan(2) =63.4 degree
26
27
Types
28
29