Docsity

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

Partial preview of the text

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

Computer

Graphics

Lecture 20

PROJECTIONS

II

How do you calculate

the corresponding

screen pixel?

The point of View (POV) must lie on the Z axis, The screen plane must be parallel to the X-Y plane, with the left and right edges of the screen parallel to the Y-axis, and the top and bottom edges of the screen parallel to the X-axis

for your view to come out
correctly, you will also
want the Z axis to pass
through the middle of the
screen. Why?

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).
What also holds true from
similar triangles is that the
ratio of two sides also
holds between the similar
triangles; this means that
the ratio of BS to AB is the
same as the ratio of CP to
AC.