# one special point from plane and 3 points

This topic is 5098 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello, I've got a mathematical problem: I've got three 2D points, each of them has a 3d point associated with it. All three 3d points are on the same plane in 3d space. (The 2D points are texture coordinates, the 3d points are the positions of their vertices). Now, I've got a fourth 2D point, somewhere. And I would like to know, where its assosiated 3D point would be. Hope this explanation is understandable. I would like to know if this problem can be solved, and if so, how. Does somebody know a solution for this?

##### Share on other sites
Definitely solveable if I undestood you correctly. My first idea for a solution (short version because I am tired):

P4 = P1 + a(P2-P1) + b(P3-P1)
the plane equation in it´s explicit form with Pn being the coordinates (coordinate vectors) of point n is true in 2D as well as in 3D, so:
1) with the 2D-coordinates Pn -which you know all n=1..4 of- calculate a and b.
2) plug a and b in the equation with the 3D-coordinates to determine P4.

##### Share on other sites
Ah, thanks for this fast response. I already thought about doing it this way, but I think I am just too stupid to get a and b. I'm currently doing it this way, but maybe I just have a thinking error somewhere:

a = ((P4 - P1) . (P2-P1)) / ( |(P4-P1)| * |(P2-P1)|)
b = ((P4 - P1) . (P3-P1)) / ( |(P4-P1)| * |(P3-P1)|)

##### Share on other sites
Ok, I don't understand your formula. The general case is a little bit complicated and will follow in badly typed HTML very soon.

Let us define p=P4-P1, u=P2-P1 and v=P3-P1.
The original equation is p = su+tv.
Multiplying by u gives us
I: pu=suu+tuv.
When using v instead we get
II: pv=suv+tvv

Now I.vv-II.uv gives us
s=((pu)(vv)-(pv)(uv))/D
where
D=(uu)(vv)-(uv)(uv).
t can be calculated the same way.
Both formulas become easier if u and v are orthogonal.
Try this, I hope it is correct.
Btw. this formula will only work if P4 is on the plane, but that's the case here, if I understand you correctly.
 Fixed braces in the formula for s.

[Edited by - VolkerG on July 8, 2004 5:54:42 PM]

##### Share on other sites
Ah, thanks, I guess this would do it. I currently solved it by calculating the intersection of P4+u and P1+v and getting the lenght of the two vectors to the intersection.

1. 1
2. 2
3. 3
4. 4
5. 5
Rutin
17

• 9
• 12
• 9
• 12
• 37
• ### Forum Statistics

• Total Topics
631420
• Total Posts
2999990
×