I want to plot a 2D disk in 3D space, angled perpendicular to a given direction. That direction is given by $ \theta$ and $ \phi$ in spherical coordinates (where $ \theta$ is polar and $ \phi$ is azimuthal cause I’m a physicist, sorry math people!).
[I apologize for the upcoming bad code formatting, I’ve been fighting the SE editor and losing. And this isn’t working.]
Here’s four approaches I’ve tried that nearly work but not quite:
-
ContourPlot3D
in cartesian coordinatesContourPlot3D[{x + y + z == 1}, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}]
This gives an inclined plane, but I can’t figure out how to put it at the desired angles $ \theta$ and $ \phi$ . I also wouldn’t know how to make this a disk with a finite radius.
-
ContourPlot3D
in spherical coordinates, by converting x+y+z==1 into sphericalContourPlot3D[{r*Sin[[Theta]]Cos[[Phi]] + rSin[[Theta]]Sin[[Phi]] + rCos[[Theta]] == 1}, {r, 0, 1}, {[Theta], 0, Pi}, {[Phi], 0, 2*Pi}, AxesLabel -> Automatic]
This uses {r,$ \theta$ ,$ \phi$ } as the plot coordinates, rather than plotting in proper cartesian space.
-
ParametricPlot3D
to make a disk, then rotate itParametricPlot3D[{r*Sin[Pi/2]Cos[[Phi]], rSin[Pi/2]Sin[[Phi]], rCos[Pi/2]}, {r, 0, 1}, {[Phi], 0, 2*Pi}, PlotRange -> {{-1, 1}, {-1, 1}, {-1, 1}}, AxesLabel -> {x, y, z}]
This can produce a disk, but I can’t figure out how to angle it. Here I set $ \theta$ =$ \pi$ /2 to make the disk.
- Use
Disk
withGraphics3D
andRotate
This would work if Disk
could be used as a 3D object! Argh!
That’s all my ideas. If you see how to fix one of these, or have another, better idea, please advise!