Help in drawing planes in mathematica

In summary, the conversation discusses manipulating a plane in polar coordinates and how the variables Theta, Phi, and R affect the visualization. Theta and Phi must have non-zero values for their changes to be visible, while R does not affect the visualization.
  • #1
dg88
10
0
Hi,

I am trying to draw a plane that is normal to a given vector. I want to enter to the normal in polar coordinates so that I can manipulate the Theta and Phi and see how various planes cut the (111) planes in silicon crystal. Help would be much appreciated.

Thanks in advance

Cheers
 
Physics news on Phys.org
  • #2
Plane[\[Theta]_, \[Phi]_] = (-Cos[\[Phi]] Sin[\[Theta]] x -
Sin[\[Phi]] Sin[\[Theta]] y)/Cos[\[Theta]];
Plot3D[Plane[0.4, 0.2], {x, -1, 1}, {y, -1, 1},
AxesLabel -> Automatic, PlotRange -> {{-1, 1}, {-1, 1}, {-1, 1}},
BoxRatios -> {1, 1, 1}]is what id try to start with.
 
  • #3
Hepth said:
Plane[\[Theta]_, \[Phi]_] = (-Cos[\[Phi]] Sin[\[Theta]] x -
Sin[\[Phi]] Sin[\[Theta]] y)/Cos[\[Theta]];
Plot3D[Plane[0.4, 0.2], {x, -1, 1}, {y, -1, 1},
AxesLabel -> Automatic, PlotRange -> {{-1, 1}, {-1, 1}, {-1, 1}},
BoxRatios -> {1, 1, 1}]


is what id try to start with.

Thanks a lot for your help. I went along with what you suggested and made some changes to go along. Here is the code that I did.


Manipulate[
Plot3D[z = (-Cos[\[Phi] Degree] Sin[\[Theta] Degree] x -
Sin[\[Phi] Degree] Sin[\[Theta] Degree] y +
r Sin[\[Theta] Degree] Cos[\[Phi] Degree])/
Cos[\[Theta] Degree], {x, -1, 1}, {y, -1, 1},
PlotRange -> {{-1, 1}, {-1, 1}, {-1, 1}}, BoxRatios -> {1, 1, 1},
Mesh -> None]], {{\[Theta], 0, "\[Theta]"}, 0, 180, 0.1,
Appearance -> "Labeled"},
{{\[Phi], 0, "\[Phi]"}, 0, 180, 0.1, Appearance -> "Labeled"},
{{r, 0.5, "R"}, 0, 1, 0.1, Appearance -> "Labeled"}]

Thanks again.
 
  • #4
I have a question if anyone can answer this. I wrote down the equation for a plane in the post above. But what happens is that if I keep Theta = 0, any changes in Phi and R are not displayed, i.e., there is no effect if I change either one of them. But if I have a non-zero Theta, the changes in Phi and R are visible in the visual. This is odd. Is there anything that I am missing?? Thanks in advance.

Cheers
 
  • #5
No, remember theta is the angle off of the upward Z axis, and phi is the angle ABOUT the Z axis. So if theta is zero, nothing should happen, because the vector is pointing up and revolving around itself, which is nothing.
R shouldn't change anything because a plane is defined by its normal unit vector, not the magnitude.
 

1. How do I draw a plane in Mathematica?

To draw a plane in Mathematica, you can use the Graphics3D function and specify the InfinitePlane option. For example, Graphics3D[{InfinitePlane[{1,2,3},{4,5,6}]},Boxed->False] will draw a plane with a normal vector of {4,5,6} passing through the point {1,2,3}.

2. Can I draw multiple planes in one plot?

Yes, you can draw multiple planes in one plot by using the Graphics3D function and specifying multiple InfinitePlane options. For example, Graphics3D[{InfinitePlane[{1,2,3},{4,5,6}],InfinitePlane[{5,6,7},{8,9,10}]},Boxed->False] will draw two planes with different normal vectors passing through different points.

3. How do I change the color of the plane?

You can change the color of the plane by using the Color option within the InfinitePlane function. For example, Graphics3D[{InfinitePlane[{1,2,3},{4,5,6},Color->Red]},Boxed->False] will draw a red plane.

4. Can I add labels or axes to the plane?

Yes, you can add labels and axes to the plane by using the Axes and AxesLabel options within the Graphics3D function. For example, Graphics3D[{InfinitePlane[{1,2,3},{4,5,6}],Axes->True,AxesLabel->{x,y,z}},Boxed->False] will draw a plane with labeled axes.

5. How do I rotate or manipulate the plane?

You can use the Rotate or Manipulate functions in Mathematica to rotate or manipulate the plane. For example, Rotate[Graphics3D[{InfinitePlane[{1,2,3},{4,5,6}]},Boxed->False],60 Degree] will rotate the plane by 60 degrees. For more complex rotations and manipulations, the Manipulate function is recommended.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
Replies
13
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
Replies
3
Views
401
Replies
2
Views
3K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Advanced Physics Homework Help
Replies
7
Views
1K
Replies
4
Views
1K
Replies
14
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
Back
Top