Help in drawing planes in mathematica

Click For Summary

Discussion Overview

The discussion focuses on drawing planes in Mathematica that are normal to a given vector, specifically using polar coordinates for the angles Theta and Phi. Participants explore how these planes intersect with the (111) planes in silicon crystals, seeking assistance with code and visualizations.

Discussion Character

  • Technical explanation
  • Exploratory
  • Mathematical reasoning

Main Points Raised

  • One participant seeks help in drawing a plane normal to a vector defined in polar coordinates, aiming to visualize intersections with silicon crystal planes.
  • Another participant shares a code snippet for plotting a plane using the specified polar coordinates and expresses gratitude for previous suggestions.
  • A later reply introduces a Manipulate function to dynamically adjust Theta, Phi, and R, noting changes in the visual output based on these parameters.
  • One participant questions the behavior of the visual output when Theta is set to zero, observing that changes in Phi and R do not affect the display in this case.
  • Another participant clarifies that when Theta is zero, the normal vector points directly upward, which explains why variations in Phi do not result in visible changes, as the vector revolves around itself.
  • This participant also notes that R should not influence the plane's definition since it is determined by the normal unit vector, not its magnitude.

Areas of Agreement / Disagreement

Participants generally agree on the definitions of Theta and Phi and their roles in determining the orientation of the plane. However, there is a lack of consensus on the implications of setting Theta to zero and its effects on the visual representation.

Contextual Notes

The discussion involves assumptions about the definitions of angles in polar coordinates and their impact on the visualization of planes in Mathematica. There are unresolved aspects regarding the behavior of the visual output when specific parameter values are used.

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 9 ·
Replies
9
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
9K
  • · Replies 1 ·
Replies
1
Views
7K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K