2D Viewing Transformation
vx1
vx2
vy1
vy2
wx1
wx2
wy1
wy2
Window
Viewport
World Coordinates
Screen Coordinates
(wx,wy)
(vx,vy)
vx = vx1 + (wx - wx1) * (vx2 - vx1) / (wx2 - wx1);
vy = vy1 + (wy - wy1) * (vy2 - vy1) / (wy2 - wy1);
Window-to-viewport mapping
Previous slide
Next slide
Back to first slide
View graphic version