I've been trying to write a script that receives the xyz coordinates of a vertex of a 3D object and returns the xyz coordinates of the vertex in a prespective projection plane, more or less like in the following image:
Example:
get_prespective(3,4,8):
bla...
new_vector = [3,4,0]
return new_vector
Supposedly you need to multiply the vector with a prespective matrix, like this:
Or multiplying the vector by this matrix:
But I'm having some trouble figuring out which matrix to use or how to use it. If somebody has a better idea, that would be great ;)


