Message Boards Message Boards

8
|
10025 Views
|
3 Replies
|
12 Total Likes
View groups...
Share
Share this post:

[GIF] Loop (Geodesics in quadrilateral space)

Nine points from a family of geodesics in quadrilateral space

Loop

As I've mentioned before, there's an identification between the Stiefel manifold $V_2(\mathbb{R}^4)$ -- which consists of $4 \times 2$ matrices with orthonormal columns -- and the moduli space of planar quadrilaterals. Of course, geodesics in the Stiefel manifold are easy to describe: given a starting matrix and an ending matrix, just rotate the first column of the starting matrix towards the first column of the ending matrix, while simultaneously rotating the second column of the starting matrix towards the second column of the ending matrix. If the plane spanned by the columns of the starting matrix is perpendicular to the plane spanned by the columns of the ending matrix, then this geodesic will be closed (periodic).

Anyway, the above GIF shows 9 points from the closed geodesic connecting the standard square to a rotated square, with the angle of rotation being a function of time. (Since 9 is odd, you can't actually see the target square; obviously this is not very useful for understanding the geodesic, but in my opinion is more aesthetically pleasing. Change n to 2 if you just want to see the starting and ending squares.)

Here's the source code:

ToReal[z_] := {Re[z], Im[z]};
ToComplex[{x_, y_}] := x + I y;
FrameToEdges[frame_] := ToReal[ToComplex[#]^2] & /@ Transpose[frame];
FrameToVertices[frame_] := Accumulate[FrameToEdges[frame]];
DualFourFrame[frame_] := Orthogonalize[NullSpace[frame]];

Manipulate[Module[{fr, dfr, dfrrot, cols, ?},
  fr = {{1/Sqrt[2], 1/2, 0, 1/2}, {0, 1/2, 1/Sqrt[2], -1/2}};
  dfr = {{0, -1/2, 1/Sqrt[2], 1/2}, {-1/Sqrt[2], 1/2, 0, 1/2}};
  cols = RGBColor /@ {"#E5FCC2", "#547980"};
  dfrrot = dfr.Transpose[RotationMatrix[?, dfr]];
  ? = ?/
     2 + ?/2 (1/2 - 1/2 Cos[? (s - Floor[s])] + Floor[s]);
  n = 9;
  Graphics[{FaceForm[None], 
    EdgeForm[Directive[JoinForm["Round"], cols[[1]], Thickness[.01]]],
     Table[Module[{verts},
      verts = FrameToVertices[Cos[t] fr + Sin[t] dfrrot];
      Polygon[-Mean[verts] + # & /@ verts]], {t, 
      0, ? - ?/n, ?/n}]}, ImageSize -> {540, 540}, 
   PlotRange -> 1/Sqrt[2], Background -> cols[[2]]]], {s, 0, 2}]
3 Replies

Nice visualization.

It reminds me that I was recently thinking about the moduli space of quadrilaterals, but from the point of view of edge lengths, where for each edge length sequence the moduli parameter is the diagonal. This is a considerably simpler, more Euclidean moduli space, but not as col as this one. The reason I was thinking about this was for a mentorship where a student is working on Thurston's algorithm, and I was thinking there must be a simpler way to go from edge lengths to a planar embedding.

The other thing it reminds me of is the general issue of visualizing higher dimensional stuff. On the one hand there is DimensionReduce. There are animations like this one, with well chosen paths like geodesics. In complex systems types of things, we want to know how simple or complex something is, and the extra dimensions add to that challenge.

Some comments on the code. It is better form (this is just my opinion) to have only one Module, and when you are doing dynamics, it can't hurt to use DynamicModule instead. Code which is static can either go in front or be part of the Initialization option of Manipulate.

DynamicModule[{fr, dfr, dfrrot, cols, \[Theta], verts}, 
 fr = {{1/Sqrt[2], 1/2, 0, 1/2}, {0, 1/2, 1/Sqrt[2], -1/2}}; 
 dfr = {{0, -1/2, 1/Sqrt[2], 1/2}, {-1/Sqrt[2], 1/2, 0, 1/2}}; 
 cols = RGBColor /@ {"#E5FCC2", "#547980"}; 
 dfrrot = dfr.Transpose[RotationMatrix[\[Theta], dfr]]; 
Manipulate[...]]
POSTED BY: Todd Rowland

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