3d point's 2d cordinates relative to 3 corners

56 Views Asked by At

The problem I have is I need to find a 3d point's relative (in 2d) coordinate based off 3 (also 3d) corner points. (the first point is on the plane created by the 3 points)

so going from three corners: $$(x1,y1,z1),(x2,y2,z2),(x3,y3,z3)$$ and the point (on the plane created by the 3 corners) $(x,y,z)$ to "new" $x,y$ coordinates for the 3 corners and the 4th point.

I'm pretty sure the best way to do this would be to rotate the corners and point to some axis and then take the points but I'm not sure how that would look like.

small visual of the problem:

and if this really cumbersome to do, these points are calculated from the intersection of 2 3d planes with a 3d one. (a 3d line formed by two planes & a third plane)

Any help is appreciated.

1

There are 1 best solutions below

0
On BEST ANSWER

So it turns out one way to do this (not the best) is to turn the line from $$(x1,y1,z1) to (x3,y3,z3)$$ into a vector, say $$\vec{v}$$ and the turn the line from $$(x1,y1,z1) to (x2,y2,z2)$$ to another vector say $$\vec{v2}$$ then we know that an x amount of the normalized vector v + a y amount normalized vector v will give the desired point (x,y,z) at that point all that is left is a simple systems of equations. Thus $$ x*\hat{v}+y*\hat{v2}= P(desired point) $$ then we know the point is at relative 2d position $$(x,y)$$ small visual of the solution