My Math Forum  

Go Back   My Math Forum > College Math Forum > Linear Algebra

Linear Algebra Linear Algebra Math Forum

LinkBack Thread Tools Display Modes
June 2nd, 2012, 12:21 AM   #1
Joined: Jun 2012

Posts: 1
Thanks: 0

Projection Matrix from 8 points

Hello there!

I'm currently looking into different solutions for a problem which has appeared in one of my coding projects. Honestly it's been a long while since I did any math more complex than 3d vectors, so I hope the mathematicians of this forum can provide me with some assistance.

What I need is a rather specific 4x4 projection matrix. I have eight points in 3d space, they represent the eight corners of the resulting frustum I'm after. To be more exact the points define two rectangles, the near and the far rectangles encompassing the frustum.


The eight corner points in example 1 are the points I have.
Example 2 is a top down view of how they're calculated. The black dot represents the camera. The red points are taken from the corners of rectangular object. The green points are then simply extended by drawing a vector from the camera towards each red point and extending past them.

That's all the relevant information I can think of right now. Any thoughts?

All help is greatly appreciated.
Attached Images
File Type: jpg Example.jpg (21.9 KB, 455 views)
FredrikAkerblom is offline  
August 10th, 2012, 03:37 AM   #2
Senior Member
Joined: Aug 2012

Posts: 229
Thanks: 3

Re: Projection Matrix from 8 points

Hey FredrikAkerblom.

The typical way to do a projection to a plane (perspective not an orthogonal) is to do x' = (x-a)/cz, y' = (y-b)/cz, z' = c. This will project a point onto the plane z' = c with a centre of x = a, y = b.

Projecting to a point between the plane that the point lies on (parallel to x-y plane) and the plane you are projecting on is a linear interpolation from the original point to the final point.

So if you have say your original point A and your projected point B, you can use the formula x = At + (1-t)B where A = (x,y,z) for original point and B = (x,y,z) for projected point.

You can generate for various values of t any point between the two where t = 0 to t = 1.
chiro is offline  

  My Math Forum > College Math Forum > Linear Algebra

matrix, points, projection

Search tags for this page
Click on a term to search for related topics.
Thread Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
calculating projection matrix guano Linear Algebra 3 January 7th, 2014 12:58 PM
Finding the matrix in the standard basis for the projection 84grandmarquis Linear Algebra 4 October 22nd, 2013 05:21 PM
Matrix Rotation with Center Points lampshade Linear Algebra 1 June 14th, 2010 05:15 PM
meaning of transpose in projection matrix bull-roarer Algebra 0 June 7th, 2009 02:53 PM
About projection redox Algebra 0 April 26th, 2009 10:37 AM

Copyright © 2019 My Math Forum. All rights reserved.