A “triangle sweep” can be defined as 2 triangles
(D,E,F) and the bilinear patches at the sides of both triangles. It’s kind of a “twisted” triangular prism.
We can define some sort of
(u,v,w) barycentric coordinates here, such that each point
P interior to the sweep could be written as
As soon as the sweep is “twisted” the behavior of those barycentric coords is no longer linear. i.e., linear motion in the
(u,v,w) space does not translate to linear motion in 3D space and viceversa. However these coordinates can be useful for certain applications.
One way to find
(u,v,w) for a given
P is to solve for
w first (the red plane below) and then find
v as regular barycentrics in the triangular section. After massaging the numbers a bit, solving for
w turns out to be a cubic equation, which is the wiggly orange curve below.
We are only interested in solutions where
w IN [0..1].