Parallel Projection Program In C

Difference Between Perspective & Parallel Projection in Tabular From
Parallel Projection Basic Principles: – The parallel projection used by drafters and engineers to create working drawings of an object which preserves its scale and shape. The complete representation of these details often requires two or more views (projections) of the object onto different view planes. In parallel projection, image points are found as the.
S.NO. | PERSPECTIVE PROJECTIONS | PARALLEL PROJECTION |
1. | If COP[ Centre Of Projection] is located at a finite point in 3 space , the result is a perspective projection. | If COP [ Centre Of Projection] is located at infinity, all the projectors are parallel and the result is a parallel projection. |
2. | Perspective projection is representing or drawing objects which resemble the real thing | parallel projection is used in drawing objects when perspective projection cannot be used. |
3. | perspective projection represents objects in a three-dimensional way. | Parallel projection is much like seeing objects through a telescope, letting parallel light rays into the eyes which produce visual representations without depth |
4. | In perspective projection, objects that are far away appear smaller, and objects that are near appear bigger | parallel projection does not create this effect. |
5. | While parallel projection may be best for architectural drawings, in cases wherein measurements are necessary | it is better to use perspective projection. |
6. | perspective projections require a distance between the viewer and the target point. | In parallel projection the center of projection is at infinity, while in prospective projection, the center of projection is at a point. |
7. | Types: 1.one point perspective, 2.Two point perspective, 3. Three point perspective, | Types: 1.Orthographic 2.Oblique |
8. |
Table of Contents |
The perpendicular projection of a vector $vec{u}$ onto another vector $vec{v}$ gives us a vector that is parallel to the vector $vec{v}$ whose length is how far the vector $vec{u}$ extends in the direction of $vec{v}$. This is illustrated below.
It may be that the vector being projected extends in the opposite direction of the vector it is being projected onto. In that case the projection looks more like the following.
Now let us develop the formula for the parallel projection. We know that the result will be parallel to $vec{v}$. We just need to figure out the magnitude. For that, we can use right triangle trigonometry. Using the following picture as a guide,
(1)Now if we combine this fact, with our previous knowledge that it should be parallel to $vec{v}$. We have,
(2)Example
Find the parallel projection of $<3,5,-2>$ onto $<4,0,1>$
Where as the parallel projection gave us a vector parallel to the onto vector, the perpendicular gives us a vector perpendicular to the onto vector. This perpendicular projection with have magnitude that corresponds to the amount $vec{u}$ extends in the direction perpendicular to $vec{v}$
It is rather straightforward to get the perpendicular projection from the parallel projection by means of vector addition as follows.
(3)Example
Find the perpendicular projection of $<3,5,-2>$ onto $<4,0,1>$
The use of vector projection can greatly simplify the process of finding the closest point on a line or a plane from a given point. We will look at two approaches. The first approach makes use of the direction normal to the object in question. This will include lines in 2D and planes in 3D. The second approach uses the direction parallel to the object, which is applicable to lines in 3D.
Lines in 2D and Planes in 3D
In these problems we will have some point in 2D or 3D that we will call $Q$ and either a line in 2D line or a plane in 3D. Both of these objects can be described in terms of a point on the object $P$ and a direction normal to the object. We will represent the normal direction by a vector $vec{n}$. We will be trying to determine the closest point $S$ on the object from the point $Q$. From the illustration below, you see that the vector, $vec{S}$, that points to the closest point $S$ is given by, $vec{S}=vec{Q}-mbox{Proj}_{vec{n}}vec{PQ}$

If we were interested in the distance from the point $Q$ to the point $S$, we would only need to calculate $ mbox{Proj}_{vec{n}}vec{PQ} $
Example
Find the point on the plane $x+2y-3z=4$ that is closest to the point $(0,1,-1)$
Lines in 2D or 3D
In these problems we will have some point in 2D or 3D that we will call $Q$ and a line in either 2D or 3D . Both lines can be described in terms of a point on the line $P$ and a direction parallel to the line. We will represent the parallel direction by a vector $vec{d}$. We will be trying to determine the closest point $S$ on the object from the point $Q$. From the illustration below, you see that the vector, $vec{S}$, that points to the closest point $S$ is given by, $vec{S}=vec{P}+mbox{Proj}_{vec{d}}vec{PQ}$
If we were interested in the distance from the point $Q$ to the point $S$, we would only need to calculate $ vec{Q} - vec{S} $
You could just buy weapons from traders in Mount And Blade 2 Bannerlord, but why would you do that when you can make your own? Mount and blade reset skills.
Example
Find the point on the line $<1+t,4-3t,2t>$ that is closest to the point $(5,6,7)$
The following page has tools for practicing the various vector operations.
Vector Operations Practice
- Find the parallel projection of $vec{u}=<1,4,-2>$ onto the vector $vec{v}=<0,3,5>$
- Find the perpendicular projection of $vec{u}=<1,4,-2>$ onto the vector $vec{v}=<0,3,5>$
- Write $vec{u}=<1,4,-2>$ as the sum of a vector parallel and a vector perpendicular to $vec{v}=<0,3,5>$
- Under what conditions would $mbox{Proj} _vec{v} vec{u} =vec{0}$
- Find the point on the line passing through (1,4,-8) and (3,2,1) that is closest to the point (0,0,0). Also give the distance from the point to the line.
- Find the point on the plane $x+y-z=2$ closest to the point (1,4,0). Also give the distance from the point to the plane.
- Why can't we use the method of involving the normal direction when finding the point closest to a line in 3D?