- Forward


Some Classical Projections
An Introduction


Prof. David Bernstein
James Madison University

Computer Science Department
bernstdh@jmu.edu

Print

Motivation
Back SMYC Forward
  • What We Have:
    • A way to represent shapes in 3D
    • 2D visual output devices
    • A way to reduce the dimensionality of our shapes (i.e., projections)
  • What We Need:
    • A way to generate "useful"/"attractive" 2D views of the 3D shapes
Approaches
Back SMYC Forward
  • Move the Projection Plane:
    • Projecting onto \(z=0\) tends to not be very "useful"
    • Instead we can project onto a more "useful" plane
  • Move the Object before Projecting:
    • Orient/transform the object so that we get a more "useful" view
Approaches (cont.)
Back SMYC Forward
  • Analysis:
    • The two approaches are equivalent
  • The Easy Appoach:
    • Think about moving the object
Orthographic Views
Back SMYC Forward
  • Multiview:
    • The projection plane is parallel to one of the "principal faces"
    • Example: An elevation (i.e., side view) in architecture
    • The name comes from the fact that we need multiple views to see more than one "principal face"
  • Axonometric:
    • We see three "principal faces" at the same time
    • (Note: An axonometric transform matrix has a determinant of 0)
Axonometric Views
Back SMYC Forward
  • Trimetric:
    • Three different foreshortenings
  • Dimetric:
    • Two different foreshortenings (i.e., one for one axis and one for the other axes)
    • The projection plane is (symmetrically) at an edge where two faces meet
  • Isometric:
    • One foreshortening (i.e., all axes have the same foreshortening)
    • The projection plane is (symmetrically) at a corner where three faces meet
Trimetric View
Back SMYC Forward
projection_trimetric
Trimetric View (cont.)
Back SMYC Forward
  • Rotation Around the \(y\)-Axis:
    • \( \left[ \begin{array}{c c c c} \cos \theta & 0 & \sin \theta & 0 \\ 0 & 1 & 0 & 0 \\ - \sin \theta & 0 & \cos \theta & 0 \\ 0 & 0 & 0 & 1\end{array}\right] \)
  • Rotation Around the \(x\)-Axis:
    • \( \left[ \begin{array}{c c c c} 1 & 0 & 0 & 0 \\ 0 & \cos \phi & -\sin \phi & 0 \\ 0 & \sin \phi & \cos \phi & 0 \\ 0 & 0 & 0 & 1\end{array}\right] \)
Trimetric View (cont.)
Back SMYC Forward
  • Unit Vector on the \(y\)-Axis:
    • \( \left[ \begin{array}{c c c c}0 \\ 1 \\ 0 \\ 1\end{array}\right] \rightarrow \left[ \begin{array}{c c c c}0 \\ \cos \phi \\ \sin \phi \\ 1\end{array}\right] \)
    • Projected: \( \left[ \begin{array}{c c c c}0 \\ \cos \phi \\ 0 \\ 1\end{array}\right] \)
    • Length (after projection): \( \sqrt{\cos^{2} \phi} \)
  • Unit Vector on the \(x\)-Axis:
    • \( \left[ \begin{array}{c c c c}1 \\ 0 \\ 0 \\ 1\end{array}\right] \rightarrow \left[ \begin{array}{c c c c}\cos \theta \\ \sin \theta \sin \phi \\ -\sin \theta \cos \phi \\ 1\end{array}\right] \)
    • Projected: \( \left[ \begin{array}{c c c c}\cos \theta \\ \sin \theta \sin \phi \\ 0 \\ 1\end{array}\right] \)
    • Length (after projection): \( \sqrt{\cos^{2} \theta + (\sin \theta \sin \phi)^{2}} \)
Dimetric View
Back SMYC Forward
  • We Want:
    • The foreshortening ratio to be the same
    • That is: \( \sqrt{\cos^{2} \theta + (\sin \theta \sin \phi)^{2}} = \sqrt{\cos^{2} \phi} \)
  • Implications:
    • \( \Rightarrow \cos^{2} \theta + (\sin \theta \sin \phi)^{2} = \cos^{2} \phi \)
    • \( \Rightarrow \cos^{2} \theta + (\sin^{2} \theta \sin^{2} \phi) = \cos^{2} \phi \)
    • Since \( \cos^{2} \alpha = 1 - \sin^{2} \alpha \) it follows that:
    • \( \Rightarrow 1 - \sin^{2} \theta + (\sin^{2} \theta \sin^{2} \phi) = 1 - \sin^{2} \phi \)
    • \( \Rightarrow - \sin^{2} \theta + (\sin^{2} \theta \sin^{2} \phi) = - \sin^{2} \phi \)
    • \( \Rightarrow - \sin^{2} \theta (1 - \sin^{2} \phi) = - \sin^{2} \phi \)
    • \( \Rightarrow \sin^{2} \theta = \frac{\sin^{2} \phi}{(1 - \sin^{2} \phi)} \)
Isometric View
Back SMYC Forward
  • We Want:
    • All three foreshortening ratios to be the same
    • That is: \( \sqrt{\cos^{2} \theta + (\sin \theta \sin \phi)^{2}} = \sqrt{\cos^{2} \phi} = \sqrt{\cos^{2} \theta} \)
  • After Some Algebra:
    • \( \sin \theta = \sqrt{1/2} \)
    • \( \sin \phi = \sqrt{1/3} \)
    • So \(\phi\) must be 35.26439 degrees and \(\theta\) must be 45 degrees
Perspective Projections
Back SMYC Forward
  • Recall:
    • \(x^{*} = \frac{x}{z/d +1}\)
    • \(y^{*} = \frac{y}{z/d +1}\)
  • Questions:
    • What are the signs of \(\frac{\partial x^*}{\partial x}\) and \(\frac{\partial x^*}{\partial z}\)?
    • What are the signs of \(\frac{\partial y^*}{\partial y}\) and \(\frac{\partial y^*}{\partial z}\)?
    • What do these signs mean for points that are farther/closer to the projection plane?
    • What do these signs mean for points that are the same except for their \(x\) or \(y\) coordinates?
Perspective Projections (cont.)
Back SMYC Forward

Using the Visualizations to Answer these Questions

projection-perspective01
projection-perspective02
One-Point Perspective
Back SMYC Forward
  • Approach:
    • Center the object
    • Use a perspective transform with a vanishing point on the \(z\)-axis
  • Visualizing the Unit Cube:
    • one-point-perspective
Two-Point Perspective
Back SMYC Forward
  • Approach:
    • Rotate the shape \(\theta\) around the \(y\)-axis
    • Translate the shape
    • Project
  • The Matrices:
    • \( \left[ \begin{array}{c c c c} \cos \theta & 0 & \sin \theta & 0 \\ 0 & 1 & 0 & 0 \\ - \sin \theta & 0 & \cos \theta & 0 \\ 0 & 0 & 0 & 1\end{array}\right] , \left[ \begin{array}{c c c c} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & m \\ 0 & 0 & 1 & n \\ 0 & 0 & 0 & 1\end{array}\right] , \left[ \begin{array}{c c c c} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 1/d & 1\end{array}\right] \)
  • The Product:
    • \( \left[ \begin{array}{c c c c} \cos \theta & 0 & \sin \theta & 0 \\ 0 & 1 & 0 & m \\ 0 & 0 & 0 & 0 \\ - (\sin \theta) /d & 0 & (\cos \theta) / d & n/d + 1\end{array}\right] \)
Two-Point Perspective
Back SMYC Forward

Visualization

two-point-perspective
Three-Point Perspective
Back SMYC Forward
  • Approach:
    • Rotate the shape \(\theta\) around the \(y\)-axis and \(\phi\) around the \(x\)-axis
    • Translate the shape
    • Project
    • Convert back to homogeneous coordinates
  • The Matrices:
    • \( \left[ \begin{array}{c c c c} 1 & 0 & 0 & 0 \\ 0 & \cos \phi & -\sin \phi & 0 \\ 0 & \sin \phi & \cos \phi & 0 \\ 0 & 0 & 0 & 1\end{array}\right] \)
    • ,
    • \( \left[ \begin{array}{c c c c} \cos \theta & 0 & \sin \theta & 0 \\ 0 & 1 & 0 & 0 \\ - \sin \theta & 0 & \cos \theta & 0 \\ 0 & 0 & 0 & 1\end{array}\right] \)
    • ,
    • \( \left[ \begin{array}{c c c c} 1 & 0 & 0 & s \\ 0 & 1 & 0 & m \\ 0 & 0 & 1 & n \\ 0 & 0 & 0 & 1\end{array}\right] \)
    • ,
    • \( \left[ \begin{array}{c c c c} 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 1/d & 1\end{array}\right] \)
There's Always More to Learn
Back -