Presentation is loading. Please wait.

Presentation is loading. Please wait.

Mapping between Scene and Screen. Screen (0, W-1) (W-1, H-1) (W-1, 0)(0, 0) Projection Plane (Xmin, Ymin)(Xmax, Ymin) (Xmax, Ymax) (Xmin, Ymax) Screen.

Similar presentations


Presentation on theme: "Mapping between Scene and Screen. Screen (0, W-1) (W-1, H-1) (W-1, 0)(0, 0) Projection Plane (Xmin, Ymin)(Xmax, Ymin) (Xmax, Ymax) (Xmin, Ymax) Screen."— Presentation transcript:

1 Mapping between Scene and Screen

2 Screen (0, W-1) (W-1, H-1) (W-1, 0)(0, 0) Projection Plane (Xmin, Ymin)(Xmax, Ymin) (Xmax, Ymax) (Xmin, Ymax) Screen Dimension W x H

3 (0, W-1) (W-1, H-1) (W-1, 0)(0, 0) (Xmin, Ymin)(Xmax, Ymin) (Xmax, Ymax) (Xmin, Ymax) Projection Plane Screen (x, y) (X, Y) Due to the same proportion: x / (W-1) = (X – Xmin)/ (Xmax – Xmin) y / (H-1) = (Ymax – Y)/ (Ymax – Ymin)

4 (0, W-1) (W-1, H-1) (W-1, 0)(0, 0) (Xmin, Ymin)(Xmax, Ymin) (Xmax, Ymax) (Xmin, Ymax) Projection Plane Screen (x, y) (X, Y) Due to the same proportion: x’ = x / (W-1) = (X – Xmin)/ (Xmax – Xmin) y’ = y / (H-1) = (Ymax – Y)/ (Ymax – Ymin) Xmin = Ymin = -1 Xmax = Ymax = 1 2 x’ = (X +1), X = 2x’ - 1 2 y’ = 1 – Y,Y = 1 – 2y’ Case One: CEGUI

5 (0, -1) (1, -1) (1, 0)(0, 0) (Xmin, Ymin)(Xmax, Ymin) (Xmax, Ymax) (Xmin, Ymax) Projection Plane Screen (x, y) (X, Y) Due to the same proportion: x’ = x / (W-1) = (X – Xmin)/ (Xmax – Xmin) -y’ = y / (H-1) = (Y - Ymin)/ (Ymax – Ymin) Xmin = Ymin = -1 Xmax = Ymax = 1 2 x’ = (X +1), X = 2x’ – 1 -2y’ = (Y+1),Y = -1 - 2y’ Case Two: “Upside down image” (TrayMng)


Download ppt "Mapping between Scene and Screen. Screen (0, W-1) (W-1, H-1) (W-1, 0)(0, 0) Projection Plane (Xmin, Ymin)(Xmax, Ymin) (Xmax, Ymax) (Xmin, Ymax) Screen."

Similar presentations


Ads by Google