My Math Forum Projection Matrix from 8 points

 Linear Algebra Linear Algebra Math Forum

June 2nd, 2012, 12:21 AM   #1
Newbie

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.

[attachment=0:1febjhww]Example.jpg[/attachment:1febjhww]

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
 Example.jpg (21.9 KB, 455 views)

 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.

 Tags matrix, points, projection

,

### find 8 points for frustum view matrix projection matrix

Click on a term to search for related topics.
 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post guano Linear Algebra 3 January 7th, 2014 12:58 PM 84grandmarquis Linear Algebra 4 October 22nd, 2013 05:21 PM lampshade Linear Algebra 1 June 14th, 2010 05:15 PM bull-roarer Algebra 0 June 7th, 2009 02:53 PM redox Algebra 0 April 26th, 2009 10:37 AM

 Contact - Home - Forums - Cryptocurrency Forum - Top