Perpendicular planes in Matlab figure

In summary, the conversation is about a problem with perpendicular planes in Matlab, specifically in calculating the normal vector and checking for perpendicularity. The mistake is identified as using an incorrect formula for calculating a, resulting in non-perpendicular planes.
  • #1
tonic
1
0
I've got a problem with perpendicular planes in Matlab.

I start with a plane A and a point P in A. I calculate a plane B perpendicular to A through point P. Equation plane A: -21660x + 1036y + 4669z = 9.22e6
Point P: [129, 46, -1925]
If [a,b,c] is the normal vector of plane B, I choose b = 0.5 and c = 1, then calculate a by assuming the dot product of the normal vectors should be zero. This results in a = 2.4
Substituting point P in the formula of B gives me d = 1593.

To check if these planes are perpendicular and both cross point P, I plotted them in Matlab.
Code:
X=0:350; Y=0:300;
[X,Y]=meshgrid(X,Y);
Z = (-d-a*X-b*Y)/c;
mesh(X,Y,Z)

i46.tinypic.com/24yu842.jpg

Now these planes do not seem perpendicular to me. (They do both cross point P, not shown in the image).

Where do I make a mistake?
 
Physics news on Phys.org
  • #2
It looks like the mistake is in the calculation of a. The dot product of the normal vectors should be zero and a = 2.4 does not satisfy this condition. To calculate the correct value of a, you need to use the formula: a = -(b*n2 + c*n3)/n1. Where n1,n2,n3 are the components of the normal vector of plane A.
 

Related to Perpendicular planes in Matlab figure

1. What are perpendicular planes in Matlab figure?

Perpendicular planes in Matlab figure refer to two planes that intersect at a right angle, forming a 90-degree angle between them.

2. How do I plot perpendicular planes in Matlab figure?

To plot perpendicular planes in Matlab figure, you can use the "surf" or "mesh" function, specifying the x, y, and z coordinates for each plane and using the "hold on" command to plot them on the same figure.

3. Can I change the color or transparency of the perpendicular planes in Matlab figure?

Yes, you can use the "color" and "alpha" properties in the "surf" or "mesh" function to change the color and transparency of the perpendicular planes in Matlab figure.

4. How do I find the intersection point of two perpendicular planes in Matlab figure?

To find the intersection point of two perpendicular planes in Matlab figure, you can use the "intersectPlanePlane" function, specifying the equations of the two planes. This will return the coordinates of the intersection point.

5. Can I rotate or translate the perpendicular planes in Matlab figure?

Yes, you can use the "rotate" and "translate" functions to rotate or translate the perpendicular planes in Matlab figure by specifying the angle or distance you want to rotate or translate them by. Alternatively, you can use the "view" command to change the viewing angle of the figure.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
631
Replies
10
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
3K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • Precalculus Mathematics Homework Help
Replies
17
Views
1K
  • Calculus and Beyond Homework Help
Replies
8
Views
530
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
8K
  • Calculus and Beyond Homework Help
Replies
14
Views
711
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
4K
Back
Top