# [GIF] Sweep Out

Posted 6 years ago
3630 Views
|
2 Replies
|
9 Total Likes
| Sweep OutThis is a great 2-sphere inside a rotating 3-sphere, viewed by first stereographically projecting to 3-dimensional space, and then orthogonally projecting to the yz-plane. I enjoy these kinds of projections, where rotations end up looking nothing like a rotation.Here's the code for the corresponding Manipulate object. Multiplying by the rotation matrix makes this pretty slow (though not as slow as using RotationMatrix[\[Theta], {{1, 0, 0, 0}, {0, 0, 0, 1}}] would have been), so the Manipulate may be super-laggy unless you have a pretty high-powered computer. Stereo3D[{x1_, y1_, x2_, y2_}] := {x1/(1 - y2), y1/(1 - y2), x2/(1 - y2)}; Manipulate[ ParametricPlot[ Table[Stereo3D[{{Cos[t], 0, 0, -Sin[t]}, {0, 1, 0, 0}, {0, 0, 1, 0}, {Sin[t], 0, 0, Cos[t]}}. {Cos[\[Theta]] Sin[\[Phi]], Sin[\[Theta]] Sin[\[Phi]], Cos[\[Phi]], 0}][[2 ;;]], {\[Theta], 0, 2 \[Pi], 2 \[Pi]/20}], {\[Phi], 0, \[Pi]}, PlotRange -> 2.5, Background -> RGBColor["#172940"], PlotStyle -> Directive[Thickness[.004], RGBColor["#acf0f2"]], ImageSize -> 540, Axes -> False], {t, 0, \[Pi]}] And here's the same thing, but without projecting to the yz-plane: Manipulate[ ParametricPlot3D[ Table[Stereo3D[{{Cos[\[Theta]], 0, 0, -Sin[\[Theta]]}, {0, 1, 0, 0}, {0, 0, 1, 0}, {Sin[\[Theta]], 0, 0, Cos[\[Theta]]}}. {Cos[t] Sin[\[Phi]], Sin[t] Sin[\[Phi]], Cos[\[Phi]], 0}], {t, 0, 2 \[Pi], 2 \[Pi]/20}], {\[Phi], 0, \[Pi]}, PlotRange -> 10, Background -> RGBColor["#172940"], PlotStyle -> Directive[Thickness[.004], RGBColor["#acf0f2"]], ImageSize -> 540, Boxed -> False, Axes -> False, ViewAngle -> \[Pi]/40, ViewPoint -> {1.3, -2.4, 2.}], {\[Theta], 0, \[Pi]}] Answer
2 Replies
Sort By:
Posted 6 years ago
 Nice, first one reminds me of electric field lines of to charges; I wonder if it is coincidentally the same 2D formula.  Answer
Posted 8 months ago -- you have earned Featured Contributor Badge Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you! Answer