I'm trying to find a solution to this symbolic non-linear vector equation:
P = a*(V0*t+P0) + b*(V1*t+P1) + (1-a-b)*(V2*t+P2) for a, b and t where P, V0, V1, V2, P0, P1, P2 are known 3d vectors.
The interesting bit is that this equation has a simple geometrical interpretation. If you imagine that points P0-P2 are vertices of a triangle, V0-V2 are roughly vertex normals* and point P lies above the triangle, then the equation is satisfied for a triangle containing point P with it's three vertices on the three rays (Vx*t+Px), sharing the same parameter t value. a, b and (1-a-b) become the barycentric coordinates of the point P.
In order words for a given P we want to find t such that P is a linear combination of (Vx*t+Px).
So if the case is not degenerate, there should be only one well defined solution for t.
*) For my needs we can assume these are roughly vertex normals of a convex tri mesh and of course lie in the half space above the triangle.
I posted this question to stackoverflow, but no one was able to help me there. Both MatLab and Maxima time out while trying to solve the equation.