Viewing Pipeline: Modeling Transformations Viewing Transformations
Viewing Pipeline: Modeling Transformations Viewing Transformations
Viewing Pipeline: Modeling Transformations Viewing Transformations
Modeling
Transformations 3D World
Model
M1
Viewing
Transformations
Scene
Model
M2
Model
3D View
Scene
M3
WCS
MCS
VCS
Rasterization
Clip
Projection
Normalize
2D/3D
Device
Scene
NDCS
2D Image
DCS
SCS
World coordinates:
All shapes with their
absolute coordinates and sizes.
circle(0,0,2)
circle(-.6,.8,.3) circle(.6,.8,.3)
lines[(-.4,0),(-.5,-.3),(.5,.3),(.4,0)]
arc(-.6,0,.6,0,1.8,180,360)
arc(-2.2,.2,-2.2,-.2,.8,45,315)
arc(2.2,.2,2.2,-.2,.8,225,135)
World coordinates
Viewing coordinates:
Viewers position and view
angle. i.e. rotated/translated
Unit measures
Screen Coordinates or
Device Coordinates
Pixels
Construct
ConstructWorld
World
Coordinate
CoordinateScene
SceneUsing
Using
Modeling
ModelingCoordinate
Coordinate
Transformation
Transformation
WC
Convert
ConvertWorld
World
Coordinates
Coordinatesto
to
Viewing
ViewingCoordinates
Coordinates
VC
Transform
TransformViewing
Viewing
Coordinates
Coordinatesto
to
Normalized
Normalized
Coordinates
Coordinates
NC
Map
MapNormalized
Normalized
Coordinates
Coordinatesto
toDevice
Device
Coordinates
Coordinates
DC
Coordinate Systems
yman
Clipping Window
(x, y)
ymin
vmin
Viewport
(u,v)
vmax
xmin
xmax
World Coordinates:
User-Defined Limits
Floating point values
umin
umax
Device Coordinates:
Device dependent Limits
Positive Integer values
2D Viewing
World coordinates to Viewing coordinates
Window to Viewport.
Window: A region of the scene selected for viewing (also
called clipping window)
Viewport: A region on display device for mapping to
window
Viewport
Window
World Coordinates
Viewing Coordinates
yv max
yw min
Rectangular
Window
yv min
xw min
xv min
xw max
y view
y world
xv max
y view
Rotated
Window
yv max
y0
yv min
x view
x0
x world
xv min
xv max
x view
y view
y world
y view
y world
y0
y view
x view
x0
x world
x world
x viewy
T( x0 , y0 )
Mwc,vc= RT
view
R ( )
x view
Normalization
should hold.
xv xvmin
xw xwmin
=
xvmax xvmin xwmax xwmin
yv yvmin
yw ywmin
=
yvmax yvmin ywmax ywmin
xv = xvmin + xw xwmin
xvmax xvmin
yv = yvmin + yw ywmin
yvmax yvmin
xwmax xwmin
ywmax ywmin
S xwmin , ywmin , s x , s y
2. Translate lower-left corner of the clipping window to the
lower-left corner of the viewport