











































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!












































































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:
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| = 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