Advertisement

Translating Planes

Started by January 04, 2002 09:54 PM
3 comments, last by tj963 23 years, 1 month ago
Hi, How do you translate a plane in the form Ax+By+Cz+D=0? Is it simply a change in the D value? Thanks, tj963
tj963
Yes, the coefficients a, b, and c represent a vector normal to the plane. If you translate a plane that vector will remain normal to it.

(assuming the actual math, implementation does not need explanation)
Advertisement
Okay. I''ve figured out how to translate it with several sines and cosines but is there a faster way?

Tim
tj963
If you are translating using a vector (dx,dy,dz) then you want A*(x+dx)+B*(y+dy)+C*(z+dz)+D+DD=0 where DD is the change in D. Now A*x+B*y+C*z=(A,B,C).(x,y,z), where . is the dot product, and A*dx+B*dy+C*dz=(A,B,C).(dx,dy,dz) so you can rewrite that as (A,B,C).(x,y,z)+(A,B,C).(dx,dy,dz)=-D-DD. Now (A,B,C).(x,y,z)=-D so you can subtract that out and you are left with (A,B,C).(dx,dy,dz)=-DD or DD=-(A,B,C).(dx,dy,dz). So testing that with the plane Z=10, using normal (0,0,2) and displacement vector (1,1,1) then DD=-(0,0,2).(1,1,1)=-2. A point in the original plane is (x,y,10) and D for that plane using the normal above is -(0,0,2).(x,y,10)=-20 so the equation, one of an infinite number of equations for the same plane, is 2*Z-20=0. The equation for the new plane is 2*Z-20-(0,0,2).(1,1,1)=0 or 2*Z-20-2=0 or 2*Z-22=0 and if you divide through by 2 and move D to the other side you get Z=11.

Any displacement vector that will take you from any point in one plane to any point in a parallel plane will have the same value for (A,B,C).(dx,dy,dz). So all a translation can do is move you closer or further away from the origin. That is because translations do not change orientation. If you translate a line then the slope of the line does not change.
Keys to success: Ability, ambition and opportunity.
I''m no math mathmatition, but I can see doing it like this:

np=new point on plane
p=Point on plane
t=Translate distance
n=normal
d=plane distance or whatever it''s called

np=(t*n)+p;
d=-(p*n)

You can now make p=np if that''s the result you were looking for.

Won''t that work? Is that what you wanted? I''m assuming you just want to move the plane along the normal forward or backward.

This topic is closed to new replies.

Advertisement