# Difference between revisions of "Planar Projection"

Tcheeseman1 (talk | contribs) (New page: Summary === Projection Parameters === Each of the parameters uses either the ''world-coordinate'' (WC) or ''viewing reference-coordinate'' (VRC) system. :* The '''View Reference Point'...) |
Tcheeseman1 (talk | contribs) (→Orthographic Projection) |
||

Line 18: | Line 18: | ||

=== Orthographic Projection === | === Orthographic Projection === | ||

+ | |||

+ | The first step is to translate the VRP to the origin, which can be achieved by multiplying its complement with the following matrix '''T''': | ||

+ | |||

+ | <math>T = \left[ \begin{array}{cccc} | ||

+ | 1 & 0 & 0 & -vrp_{x} \\ | ||

+ | 0 & 1 & 0 & -vrp_{y} \\ | ||

+ | 0 & 0 & 1 & -vrp_{z} \\ | ||

+ | 0 & 0 & 0 & 1 | ||

+ | \end{array} \right] | ||

+ | </math> | ||

+ | |||

+ | The second step is to then rotate VPN to the ''z'' axis and VUP to the ''y'' axis. To do this we will calculate the following vectors: | ||

+ | |||

+ | :* <math>R_{z} = \frac{VPN}{|VPN|}</math> | ||

+ | :* <math>R_{x} = \frac{VUP \times R_{z}}{|VUP \times R_{z}|}</math> | ||

+ | :* <math>R_{y} = R_{z} \times R_{x}</math> | ||

+ | |||

+ | The components of these vectors (e.g. <math>R_{x} = <r_{x_{1}}, r_{x_{2}}, r_{x_{3}}></math>) then form the rotation matrix R: | ||

+ | |||

+ | <math>R = \left[ \begin{array}{cccc} | ||

+ | r_{x_{1}} & r_{x_{2}} & r_{x_{3}} & 0 \\ | ||

+ | r_{y_{1}} & r_{y_{2}} & r_{y_{3}} & 0 \\ | ||

+ | r_{z_{1}} & r_{z_{2}} & r_{z_{3}} & 0 \\ | ||

+ | 0 & 0 & 0 & 1 | ||

+ | \end{array} \right] | ||

+ | </math> | ||

+ | |||

+ | The final transformation matrix for orthographic projection is then the result of the following multiplication: | ||

+ | |||

+ | <math>N_{par} = (S_{par} \cdot (T_{par} \cdot (SH_{par} \cdot (R \cdot T \cdot (-VRP)))))</math> | ||

=== Oblique Projection === | === Oblique Projection === |

## Revision as of 11:42, 17 August 2009

Summary

## Contents

### Projection Parameters

Each of the parameters uses either the *world-coordinate* (WC) or *viewing reference-coordinate* (VRC) system.

- The
**View Reference Point**(VRP) is the point (WC) from which the camera is viewing the 3D geometry. - The
**View Plane Normal**(VPN) is the normal (WC) ... - The
**View Up Vector**(VUP) is the vector (WC) that defines the orientation of the camera (i.e. which way is up) - The
**Projection Reference Point**(PRP) is the point (VRC) ... - The
**Viewing Window**is the rectangle (VRC) that defines the size of the 2D window upon which the 3D geometry will be projected. - The
**projection type**can be either parallel or perspective

- The

## Parallel Projection

Summary

### Orthographic Projection

The first step is to translate the VRP to the origin, which can be achieved by multiplying its complement with the following matrix **T**:

The second step is to then rotate VPN to the *z* axis and VUP to the *y* axis. To do this we will calculate the following vectors:

The components of these vectors (e.g. ) then form the rotation matrix R:

The final transformation matrix for orthographic projection is then the result of the following multiplication:

### Oblique Projection

## Perspective Projection

Summary