Docsity

Oblique Projection - Computer Graphics - Lecture Slides, Slides of Computer Graphics

Partial preview of the text

Download Oblique Projection - Computer Graphics - Lecture Slides and more Slides Computer Graphics in PDF only on Docsity!

Computer

Graphics

Lecture 28

Oblique Projection

Xp = x + z ( L1 cos (Ф) )

Yp = y + z ( L1 sin (Ф) )

Perspective Projection

Because the POV represents the viewer’s eye, and we presume that the viewer will be behind the center of the screen.

Two common approaches are used with this:

  1. The first is where the POV is at some point (0, 0, -z) and the screen lies on the X-Y plane, graphically, this looks like figure:

Calculating the screen pixel that correlates to a 3D point is now a matter of simple geometry. From a viewpoint above the screen and POV (looking at the X-Z plane), the geometry appears like the one shown in figure below:

In geometric terms, we say that the triangle from A to B to S is similar to the triangle from A to C to P because the three angles that make up the triangles are the same; the angle from AB to AS is the same as the angle from AC to AP.

The two right angles i.e. 90 o^ , and therefore the remaining two angles are the same (the sum of the angles in a triangle is always 180 degrees).

But we know what AB is - it is Screen.z! and

we know what AC is - it is point.z! and

we know what CP is - it is point.x!

therefore:

|BS| / |AB| = |CP| / |AC|

|BS| = |AB| * |CP| / |AC|

|BS| = Screen.z * point.x / point.z

Triangles

Triangles "flesh out" a 3D object, connecting them together to form a skin or mesh that defines the boundary surface of an object