Computer Graphics - 3D-Viewing
Computer Graphics - 3D-Viewing
z
dp Pp
xp
z projection transformations
x
x
orthogonal and parallel projections
perspective projections
display
plane
= or !
1
3D Display: Depth Cueing + Visibility 3D Display: Shaded Display
3 parallel-projection views of an
object, showing relative proportions
from different viewing positions
perspective perspective
projection projection
local and global local and global
illumination illumination
models models
shadow reflectivity
generation transparency
shadows
2
3D Display: Surface Rendering Other 3D Display Methods
exploded and
perspective cutaway views
projection
simple
illumination model a fully rendered
surface textures turbine can also be
viewed as a surface-
rendered exploded
display
3
3D Viewing: Camera Definition 3D Viewing Coordinates (1)
similar to taking a photograph view reference point
involves selection of origin of viewing-coordinate system
camera position camera position or look-at point
camera direction
camera orientation yv
right-handed
“window” (aperture) of camera xv viewing-coord.
yw zv
world system, with
coordinates P0 = (x0, y0, z0 ) axes x0, y0, z0,
relative to
xw world-coord.
viewing
coordinates zw scene
Werner Purgathofer / Computergraphik 1 18 Werner Purgathofer / Computergraphik 1 19
4
3D Viewing Coordinates (6) 3D Viewing Coordinates (7)
moving around
in a scene by
changing the
position of the
view reference
point
viewing a scene
from different
directions with a
fixed view-
reference point
Werner Purgathofer / Computergraphik 1 24 Werner Purgathofer / Computergraphik 1 25
yw yv xv yw yw
zv
yv xv yv
zv xv
xw xw zv xw
zw zw zw
parallel projection:
MWC,VC = Rz· Ry· Rx·T parallel lines,
preserves relative perspective projection:
aligning viewing system with world-coordinate
proportions center of projection,
axes using translate-rotate transformations
realistic views
Werner Purgathofer / Computergraphik 1 26 Werner Purgathofer / Computergraphik 1 27
Vp Vp
orthographic oblique
projection projection front side
elevation elevation
view view
orientation of the projection vector Vp
orthographic projections isometric projection
of an object for a cube
Werner Purgathofer / Computergraphik 1 28 Werner Purgathofer / Computergraphik 1 29
5
Orthographic Parallel Projection Oblique Parallel Projection
tan α = z / L
yv xp = x
(x,y,z) yv L = z / tan α
yp = y
zp = 0 xp = x + Lcos φ
(xp,yp) y p = y + Lsin φ
(x,y)
⎡1 0 0 0⎤ (x,y,z) α ⎡ cos φ ⎤
⎢0 0⎥
1 0 L ⎢1 0
tan α
0⎥
xv M parallel = ⎢ ⎥ φ ⎢ ⎥
⎢0 0 0 0⎥ xv sin φ
⎢0 M parallel = ⎢0 1
tan α
0⎥
⎣ 0 0 1⎥⎦ (x,y) ⎢ ⎥
⎢0 0 0 0⎥
zv zv ⎣⎢0 0 0 1⎦⎥
Werner Purgathofer / Computergraphik 1 30 Werner Purgathofer / Computergraphik 1 31
6
1st Derivation of Perspective (2) 2nd Derivation of Perspective (1)
y
2. for zvp ≠ 0 P(x,y,z)
perspective
z=zvp (xp,yp,zvp) projection of a
P(x,y,z) u=1 point P (x,y,z)
(0,0,zprp) u=0
dp Pp to position
z zvp zprp zv (xp, yp, zp) on
z xp view
x plane the view plane
x
xp : x = dp : (zprp- z) x′ = x − xu (x’,y’,z’) any point on line for 0 ≤ u ≤ 1
y′ = y − yu
x⋅dp y⋅ d p zvp − z
xp = yp = zp = zvp z′ = z − ( z − z prp)u z′ = zvp ⇒ u =
zprp−z zprp−z z prp − z
Werner Purgathofer / Computergraphik 1 36 Werner Purgathofer / Computergraphik 1 37
1-point 3-point
perspective persp. proj.
projection
2-point
persp. proj.
Werner Purgathofer / Computergraphik 1 40