<p>Your first image employs an orthographics projection, while the second uses a perspective projection. You can look up the perspective matrix derivation in: <a href="http://www.songho.ca/opengl/gl_projectionmatrix.html" rel="nofollow noreferrer">http://www.songho.ca/opengl/gl_projectionmatrix.html</a> Note that there's a division at the end to account for perspective projection being a non-linear transformation.</p>

CC BY-SA 4.0
2019-03-15T18:08:01.363Z
2019-03-15T18:08:01.363Z
lightxbulb
<p>I know this question may be a little basic, but still I haven't found an answer for it anywhere.</p>

<p>Let's say I have a normalized cube; vertices at (+-0.5, +-0.5, +-0.5)
If I render it on screen (omitting the Z axis), I'll see a square.</p>

<p>If I rotate it along the Z axis with 45 degrees, I'll see two rectangles:</p>

<p><a href="https://i.sstatic.net/EulxU.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/EulxU.jpg" alt="enter image description here"></a></p>

<p>However, I would like to see it with perspective, so it should look something like this:</p>

<p><a href="https://i.sstatic.net/4bxmR.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/4bxmR.jpg" alt="enter image description here"></a></p>

<p>What is the matrix multiplication that transfers the original points to the rotated+perspective points?</p>

CC BY-SA 4.0
2019-03-16T11:32:22.873Z
Without matrix form just rotate the points 45 degrees around the y axis. Then divide x and y by z and get rid of the z if you want perspective. How much you divide by z controls the fov (but is not formally the fov).
Andrew Wilson
<computational-geometry>
Simple Two Point Perspective of a Cube
MattS
# Simple Two Point Perspective of a Cube

(Asked by: username_0 on 2019-03-15)

I know this question may be a little basic, but still I haven't found an answer for it anywhere.

Let's say I have a normalized cube; vertices at (+-0.5, +-0.5, +-0.5)
If I render it on screen (omitting the Z axis), I'll see a square.

If I rotate it along the Z axis with 45 degrees, I'll see two rectangles:

[![enter image description here](https://i.sstatic.net/EulxU.jpg)](https://i.sstatic.net/EulxU.jpg)

However, I would like to see it with perspective, so it should look something like this:

[![enter image description here](https://i.sstatic.net/4bxmR.jpg)](https://i.sstatic.net/4bxmR.jpg)

What is the matrix multiplication that transfers the original points to the rotated+perspective points?

**Tags:** computational-geometry

> **Comments:**
> **username_1**: Without matrix form just rotate the points 45 degrees around the y axis. Then divide x and y by z and get rid of the z if you want perspective. How much you divide by z controls the fov (but is not formally the fov).  

---

## 1 answers

### Answer by username_2 on 2019-03-15. Score: 2

Your first image employs an orthographics projection, while the second uses a perspective projection. You can look up the perspective matrix derivation in: <http://www.songho.ca/opengl/gl_projectionmatrix.html> Note that there's a division at the end to account for perspective projection being a non-linear transformation.


---

