Perspective Projection & Excel / VBA

GBagley

Board Regular
Joined
Feb 8, 2011
Messages
84
I'm trying to set up a VBA program that will take a list of x,y,z plot points (points of a 3D object) and draw them on a 2-dimensional plane (excel) based on a certain perspective/angle and distance from the viewer.

How the heck do I do this? :stickouttounge:

I've read some things on perspective projection (such as: http://www.math.utah.edu/~treiberg/Perspect/Perspect.htm), which seems to be the concept that I'm looking for, but I get lost in all the mathematical stuff and am not sure how to translate it into VBA.


projection.GIF



So lets say x, y, z is the coordinate (in 3D space) of one of the corner points of that cube.

a, b, c is the coordinate (in the same 3D space) of the viewer. What is the formula (in VBA compatible terms) to get the u, v coordinate (2D plot point on the 'drawing plane') that would be seen from the viewers perspective? Given the 3D space that the drawing plane is in (distance from the object and the viewer and angle -- I'm not sure exactly how to factor these in...).

Thanks for any help!
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Thank you for the feedback and search effort from your part.
 
Upvote 0

Forum statistics

Threads
1,224,607
Messages
6,179,871
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top