Help in drawing planes in mathematica

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
4 replies · 4K views
dg88
Messages
10
Reaction score
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
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.
 
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.
 
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
 
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.