Message Boards Message Boards

[GiF] Cyclic Family (Dancing lines representing cyclic quadrilaterals)

Dancing lines representing cyclic quadrilaterals

Cyclic Family

Sorry for the mostly unmotivated nature of the following code. As I've alluded to on various occasions (also here and here), we have a theory of polygons where the moduli space of $n$-gons is the Grassmannian $G_2(\mathbb{R}^n)$ of 2-planes through the origin in $\mathbb{R}^n$.

My latest realization (which really just amounts to remembering the very early history of Grassmannians) was that, duh, this means you can associate $n$-gons with lines (not necessarily through the origin) in $\mathbb{R}^{n-1}$. Of course, this isn't that much of a help for visualizing when $n$ is large, but it's certainly easier (at least for me) to visualize lines in $\mathbb{R}^3$ than planes through the origin in $\mathbb{R}^4$.

That's what's shown in the GIF: this is the collection of lines associated to a one-parameter family of cyclic quadrilaterals where three vertices are fixed to be the vertices of a square and the fourth rotates around the circle (for annoying reasons having to do with signs, there are actually 8 lines associated to any given polygon). Of course, these should really be infinite lines; they only look like segments because they're cut off by the bounding box. But in my opinion the animation actually looks nicer and more interesting with the bounded segments (you can see what the infinite lines look like by increasing PlotRange by a factor of 20 and decreasing ViewAngle by the same factor of 20).

Anyway, here's the code:

RealPoint[p_] := p[[1 ;; 3]]/p[[4]];

PluckerLine[{a_, b_}] := Module[{safeA, safeB},
   safeA = If[a[[4]] == 0, a + b, a];
   safeB = If[b[[4]] == 0, a + b, b];
   InfiniteLine[RealPoint /@ {safeA, safeB}]];

FamilyFromVerts[V_] := 
  Map[Transpose, 
   Map[{Re[#], Im[#]} &, 
    Tuples[{1, -1}*(Sqrt[#[[1]] + #[[2]] I]) & /@ (V - 
        RotateRight[V])], {2}], {1}];

DynamicModule[{cols},
 cols = RGBColor /@ {"#9EFFA9", "#36485E"};
 Manipulate[
  Graphics3D[{Thickness[.01], cols[[1]], 
    PluckerLine /@ 
     FamilyFromVerts[{{Cos[θ], Sin[θ]}, {0, 1}, {-1, 
        0}, {0, -1}}]}, PlotRange -> 2, Boxed -> False, 
   ViewVertical -> {-(1/Sqrt[2]), 0, 1/Sqrt[2]}, 
   ViewAngle -> Pi/2500, ViewPoint -> 1000 {1, 1, 1}, 
   ImageSize -> 540, Background -> cols[[2]]], {θ, 0, 
   2 Pi}]]

(One note: to produce the actual GIF I messed with $\theta$ to get a smoother animation. I can share the function if anybody really wants, but it's pretty gross and mostly just obscures what's actually going on.)

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: Moderation Team
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