I have a 3d point, defined by
[x0, y0, z0]
[a, b, c, d]
[a, b, c]
ax + by + cz + d = 0
First of all, you need to compute your
v vectors. There is no unique way to define them, but a convenient and fast way may be something like this:
n = [a, b, c] u = normalize([b, -a, 0]) // Assuming that a != 0 and b != 0, otherwise use c. v = n x u // If n was normalized, v is normalized already.
Now a simple dot product will do:
u_coord = dot(u,[x0 y0 z0]) v_coord = dot(v,[x0 y0 z0])
Notice that this assumes that the origin of the u-v coordinates is the world origin (0,0,0).
This will work even if your vector
[x0 y0 z0] doesn't exactly lies on the plane. If that is the case, it will just project it to the plane.