Problem7:Is the distance between two parallel planes, Ax + By + Cz = D1 and Ax + By + Cz = D2 given by |D1-D2| ? If not, what is the correct formula. Find the distance between the planes, x+y+2z=2 and x+y+2z=4.
|By drawing the picture of two parallel planes with position vectors u1 and u2 you can see that the distance between the planes is NOT given by |D1-D2| but by the length of the projection of (u2-u1) onto the normal to the planes. As a function dist this is,|
> dis := (n,D1,D2) -> abs(D2-D1)/len(n):
|where len is just the length function,|
> len := vec -> sqrt( innerprod(vec,vec) ):
|for the numbers in the problem,|
> ans := dis([1,1,2],2,4);
1/2 ans := 1/3 6> evalf(%);