Message Boards Message Boards

8
|
8894 Views
|
2 Replies
|
9 Total Likes
View groups...
Share
Share this post:

[GIF] Sweep Out

Sweep Out

Sweep Out

This 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:

3D stereographic sphere

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]}]
2 Replies

enter image description here -- you have earned Featured Contributor Badge enter image description here 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!

POSTED BY: EDITORIAL BOARD

Nice, first one reminds me of electric field lines of to charges; I wonder if it is coincidentally the same 2D formula.

enter image description here

POSTED BY: Sam Carrettie
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract