Message Boards Message Boards


[GIF] Move Along (Envelopes of conic sections)

Posted 5 years ago
7 Replies
23 Total Likes

Envelopes of conic sections

Move Along

Consider a circle of latitude at height $z=-3/4$ on the unit sphere. The orthogonal complements of unit vectors on the circle are planes through the origin in $\mathbb{R}^3$, which we can also interpret as lines in $\mathbb{RP}^2$, the real projective plane. In order to visualize these lines, take the intersection of the planes with the plane $z=1$. These lines will form the envelope of a circle in the $z=1$ plane.

Now, as we rotate the unit sphere around the $y$-axis, the lines in the $z=1$ plane will form the envelopes of a family of conics. What the animation actually shows are the points of intersections of the lines corresponding to 50 equally-spaced points on this rotating circle on the unit sphere.

Here's the code:

DynamicModule[{m, p, a, \[Theta] = 0., t = \[Pi]/1., r = -0.75, lines,
   linepairs, dots, cols = RGBColor /@ {"#E84A5F", "#2A363B"}},
  m = RotationMatrix[t, {Cos[\[Theta]] Sin[\[Phi]], Sin[\[Theta]] Sin[\[Phi]], Cos[\[Phi]]}];
  p[s_] = m.{Sqrt[1 - r^2] Cos[s], Sqrt[1 - r^2] Sin[s], r};
  a = m.{0, 0, 1};
  lines = 
       0}, {0, -p[s][[3]]/p[s][[2]]}}], {s, 0, 2 \[Pi] - 2 \[Pi]/50, 2 \[Pi]/50}];
  linepairs = Subsets[lines, {2}];
  dots = DeleteCases[RegionIntersection @@ # & /@ linepairs, 
  Graphics[{White, PointSize[.005], cols[[1]], dots}, 
   ImageSize -> 540, Frame -> False, Background -> cols[[-1]], 
   PlotRange -> 5], {\[Phi], 0., \[Pi]/2}]
7 Replies

enter image description here - another post of yours has been selected for the Staff Picks group, congratulations! We are happy to see you at the top of the "Featured Contributor" board. Thank you for your wonderful contributions, and please keep them coming!

Posted 4 months ago

Simply superb, i watched most of your GIF Keep going, Keep growing

Posted 4 months ago

There is something wrong with the code. Probably an encoding issue when pasting it. I see a question mark as a variable name.

Try now (Greek letters got eaten by gremlins).

I often use this page for getting WL special characters to unicode conversion:

Yes, that is what I originally did when I posted the code. But a couple of years ago some change to the Community back end screwed up a bunch of Unicode characters and converted them to question marks. So I don't do that anymore.

Thank you for letting me know, we will look into it. And apologies for the inconvenience. Another nice way to avoid the whole issue including unicode conversion, is just embed the notebook -- in the editor there is now a button for that. Embedded notebooks can be mixed with other usual type of content in a single post: text, images, any markdown elements, other notebooks. An embedded notebook can be as simple as a single cell and as complex asa blog article -- and it will preserve all the formatting of the Wolfram Cloud notebooks.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract