<p>Perspective projection changes the size of an object as it's distance changes, while orthographic projection does not.  That is part of the definition of those projection types.</p>

<p>To simplify things a bit, a simple perspective projection of a 3d point to a 2d point can be calculated like this:</p>

<p>$x_{2d} = x/z\\
y_{2d} = y/z$</p>

<p>As you can see, the 2d version of the x and y change depending on the value of z.</p>

<p>Orthographic projection on the other hand can be calculated like this:</p>

<p>$x_{2d} = x\\
y_{2d} = y$</p>

<p>In that example, you can see that the x and y values do not depend at all on z, so you can move closer to or farther away from an object in orthographic projection and it's size will not change.</p>

<p>As a fun bit of related trivia, the sun is so far away that when the light gets here, it's all basically going in the same direction.</p>

<p>This is a reason why we have directional lighting, where light beams are always moving in the same way, because that is how sun light works.</p>

<p>Anyways, since the light beams are parallel it means that your shadows in sun light are orthographic projections of your silhouette.  In other words, as you move your hand closer to or farther from the sun here on earth, the shadow of your hand doesn't change size.</p>

<p>However, if you have a more local light source - light a lamp - it casts a perspective projection type of shadow, where the closer to the light source your hand is, the larger the shadow it casts.</p>

<p>This is tied to the definition of an orthographic projection, which is that the focal length is infinitely long.  The sun is far enough away that we can consider it infinity in lighting, for as much accuracy as we care about :P</p>

CC BY-SA 3.0
2016-10-13T04:40:09.687Z
Beautifully explained, I kinda related the fact to the perspective division but wasn't sure, now I am, thanks !
BRabbit27
CC BY-SA 3.0
2016-10-12T22:39:57.350Z
2016-10-12T22:39:57.350Z
Alan Wolfe
<p>I have read through <a href="http://www.songho.ca/opengl/gl_projectionmatrix.html" rel="noreferrer">this article</a> about perspective and orthographic projection matrices.</p>

<p>I started playing with the perspective matrix and as expected if I either increase/decrease the field of view i have a zoom out/in effect. Similarly, if I move the camera position forward/backwards I see the object being close or further away.</p>

<p>However, when I tried the orthographic matrix, since there is no field of view parameter, I tried only moving the camera forward/backwards but my model always looked the same size.</p>

<p>Can anybody explain to me why this is happening?</p>

<opengl><transformations><projections>
Zoom in orthographic vs perspective projection
BRabbit27
# Zoom in orthographic vs perspective projection

(Asked by: username_0 on 2016-10-12)

I have read through [this article](http://www.songho.ca/opengl/gl_projectionmatrix.html) about perspective and orthographic projection matrices.

I started playing with the perspective matrix and as expected if I either increase/decrease the field of view i have a zoom out/in effect. Similarly, if I move the camera position forward/backwards I see the object being close or further away.

However, when I tried the orthographic matrix, since there is no field of view parameter, I tried only moving the camera forward/backwards but my model always looked the same size.

Can anybody explain to me why this is happening?

**Tags:** opengl, transformations, projections


---

## 1 answers

### Answer by username_1 on 2016-10-12. Score: 7 | Accepted answer

Perspective projection changes the size of an object as it's distance changes, while orthographic projection does not. That is part of the definition of those projection types.

To simplify things a bit, a simple perspective projection of a 3d point to a 2d point can be calculated like this:

$x\_{2d} = x/z\\
y\_{2d} = y/z$

As you can see, the 2d version of the x and y change depending on the value of z.

Orthographic projection on the other hand can be calculated like this:

$x\_{2d} = x\\
y\_{2d} = y$

In that example, you can see that the x and y values do not depend at all on z, so you can move closer to or farther away from an object in orthographic projection and it's size will not change.

As a fun bit of related trivia, the sun is so far away that when the light gets here, it's all basically going in the same direction.

This is a reason why we have directional lighting, where light beams are always moving in the same way, because that is how sun light works.

Anyways, since the light beams are parallel it means that your shadows in sun light are orthographic projections of your silhouette. In other words, as you move your hand closer to or farther from the sun here on earth, the shadow of your hand doesn't change size.

However, if you have a more local light source - light a lamp - it casts a perspective projection type of shadow, where the closer to the light source your hand is, the larger the shadow it casts.

This is tied to the definition of an orthographic projection, which is that the focal length is infinitely long. The sun is far enough away that we can consider it infinity in lighting, for as much accuracy as we care about :P

> **Comments:**
> **username_0**: Beautifully explained, I kinda related the fact to the perspective division but wasn't sure, now I am, thanks !  

---

