Mathematica Help in drawing planes in mathematica

AI Thread Summary
The discussion focuses on drawing a plane in Mathematica that is normal to a given vector using polar coordinates for manipulation. The user initially provides a code snippet for plotting a plane and later incorporates a Manipulate function to adjust the angles Theta and Phi, along with a radius R. A key issue arises when Theta is set to zero, as changes in Phi and R do not affect the visual output, which is explained by the fact that a zero Theta indicates the vector points straight up, limiting any observable changes. The response clarifies that the plane's definition relies on the normal unit vector, making R irrelevant to the plane's orientation. The conversation emphasizes understanding the geometric implications of the angles in relation to the plane's representation.
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.
 

Similar threads

Replies
2
Views
2K
Replies
3
Views
9K
Replies
1
Views
7K
Replies
1
Views
3K
Replies
3
Views
4K
Replies
13
Views
2K
Replies
4
Views
3K
Replies
3
Views
2K
Replies
1
Views
2K
Back
Top