- #1
wukunlin
Gold Member
- 480
- 117
This may belong to the computing subforum, let me know if this is more true than having it here in the math forum :)
My questions are
1) Suppose there is a plane in 3D space and I have 3 points to define it:
p1 = {x1, y1, z1}
p2 = {x2, y2, z2}
p3 = {x3, y3, z3}
and I want to put a particular point p4 which I already know the x- and z- coordinates.
What will be the most efficient way to compute the y- coordinate of p4?
I can think of the nasty method which I compute the determinant of a 4x4 matrix to find the coefficients for:
ax + by + cz + z = 0
Then substitute my known x and z, I get the feeling this is very inefficient and there are more elegant solutions than this. Are there any known algorithms to deal with this problem?
2) Now that I have my p4, I want have the same relative position to the 3 points p1, p2, p3 if someone move this triangle around:
f(p1, p2, p3) = p4
for example, if p4 happens to be in the middle of the triangle, the function would be the average of each of the x, y, z coordinates of the 3 points. But for a point that is off-centered, how will I go about finding what this function should be?
My questions are
1) Suppose there is a plane in 3D space and I have 3 points to define it:
p1 = {x1, y1, z1}
p2 = {x2, y2, z2}
p3 = {x3, y3, z3}
and I want to put a particular point p4 which I already know the x- and z- coordinates.
What will be the most efficient way to compute the y- coordinate of p4?
I can think of the nasty method which I compute the determinant of a 4x4 matrix to find the coefficients for:
ax + by + cz + z = 0
Then substitute my known x and z, I get the feeling this is very inefficient and there are more elegant solutions than this. Are there any known algorithms to deal with this problem?
2) Now that I have my p4, I want have the same relative position to the 3 points p1, p2, p3 if someone move this triangle around:
f(p1, p2, p3) = p4
for example, if p4 happens to be in the middle of the triangle, the function would be the average of each of the x, y, z coordinates of the 3 points. But for a point that is off-centered, how will I go about finding what this function should be?