[GIF] Isometries

Posted 3 years ago
3436 Views
|
5 Replies
|
5 Total Likes
| IsometriesIn our paper "Probability theory of random polygons from the quaternionic viewpoint", Jason Cantarella, Tetsuo Deguchi, and I showed how to put a highly-symmetric measure on the space of (planar or space) $n$-gons using a connection between polygon spaces and Stiefel and Grassmann manifolds first described by Hausmann and Knutson. For example, there is a (generically) $2^n$-to-1 map from the Stiefel manifold $V_2(\mathbb{R}^n)$ of 2-frames in $\mathbb{R}^n$ (i.e., $n \times 2$ matrices with orthonormal columns) to the moduli space of $n$-gons in the plane of perimeter 2 up to translations. The important upshot from our perspective is that the Stiefel manifold has a natural (left) $O(n)$ action and corresponding invariant Riemannian metric and probability measure (namely, Haar measure). This means that $O(n)$ acts transitively on the space of planar $n$-gons (which is somewhat surprising) and that it's straightforward to put an $O(n)$-invariant Riemannian metric on the space of $n$-gons.In particular, $SO(3)$ acts by isometries on the space of triangles. The GIF shows the orbit of the equilateral triangle under the action of the one-parameter subgroup of rotations around the axis $(-1/2,1/2,-1/\sqrt{2})$.Here's the code (which I don't explain, but which is hopefully not too opaque; to see why the FrameToEdges map is magically the right thing, see one of the aforelinked papers or these slides): ToComplex[{x_, y_}] := x + I y; ToReal[z_] := {Re[z], Im[z]}; FrameToEdges[frame_] := ToReal[ToComplex[#]^2] & /@ Transpose[frame]; FrameToVertices[frame_] := Accumulate[FrameToEdges[frame]]; Manipulate[Module[{mat, frame, rotatedframe, verts, com}, mat = RotationMatrix[ t, {Cos[\[Theta]] Sin[\[Phi]], Sin[\[Theta]] Sin[\[Phi]], Cos[\[Phi]]}] /. {\[Theta] -> 3 \[Pi]/4, \[Phi] -> 3 \[Pi]/4}; frame = Transpose[ ToReal[Sqrt[#]] & /@ (E^(I #)*2/3 & /@ Range[0, 4 \[Pi]/3, 2 \[Pi]/3])]; rotatedframe = frame.Transpose[mat]; verts = FrameToVertices[rotatedframe]; com = Mean[verts]; verts = RotationMatrix[t].# & /@ (# - com & /@ verts); Graphics[{FaceForm[None], EdgeForm[ Directive[RGBColor["#383a40"], Thickness[.009], JoinForm["Round"]]], Polygon[verts]}, PlotRange -> .8, ImageSize -> 540, Background -> RGBColor["#F9F9F9"]]], {t, 0, 2 \[Pi]}] Answer
5 Replies
Sort By:
Posted 3 years ago
 By the way, @Vitaliy Kaurov, I encountered a strange issue when writing the second paragraph above. The parser for the preview window wouldn't convert "[somewhat surprising]" into a link if the "O(n)" and "n" after the parentheses had dollar signs around them, even though it comes out fine in the published post. This seems to be due to some sort of issue with the interplay between parentheses, dollar signs, and square brackets. Here's the minimal example I could come up with:Writing $On$ ([link]) $O(n)$ produces what you'd expect, but writing $O(n)$ ([link]) $O(n)$ gives unexpected behavior, in that the intended link isn't actually a link in the post preview window (though it is in the final post). Answer
Posted 3 years ago
 Thanks for reporting this, @Clayton Shonkwiler we will add this to the list of small issues we have with editor and address at a Community update. I by the way quite enjoyed this GIF, I love building objects on trajectories - I call them "rails". I find that for nice visual feel sometimes it is worth to show the rails: ToComplex[{x_, y_}] := x + I y; ToReal[z_] := {Re[z], Im[z]}; FrameToEdges[frame_] := ToReal[ToComplex[#]^2] & /@ Transpose[frame]; FrameToVertices[frame_] := Accumulate[FrameToEdges[frame]]; data = Table[ Module[{mat, frame, rotatedframe, verts, com}, mat = RotationMatrix[t, {Cos[θ] Sin[ϕ], Sin[θ] Sin[ϕ], Cos[ϕ]}] /. {θ -> 3 π/4, ϕ -> 3 π/4}; frame = Transpose[ToReal[Sqrt[#]] & /@ (E^(I #)*2/3 & /@ Range[0, 4 π/3, 2 π/3])]; rotatedframe = frame.Transpose[mat]; verts = FrameToVertices[rotatedframe]; com = Mean[verts]; verts = RotationMatrix[t].# & /@ (# - com & /@ verts) ], {t, 0, 2 π, .03}]; rail = Graphics[{Dashed, Thick, RandomColor[], Line[#]} & /@ Transpose[data]] Manipulate[ Module[{mat, frame, rotatedframe, verts, com}, mat = RotationMatrix[t, {Cos[θ] Sin[ϕ], Sin[θ] Sin[ϕ], Cos[ϕ]}] /. {θ -> 3 π/4, ϕ -> 3 π/4}; frame = Transpose[ToReal[Sqrt[#]] & /@ (E^(I #)*2/3 & /@ Range[0, 4 π/3, 2 π/3])]; rotatedframe = frame.Transpose[mat]; verts = FrameToVertices[rotatedframe]; com = Mean[verts]; verts = RotationMatrix[t].# & /@ (# - com & /@ verts); Show[ rail, Graphics[{FaceForm[None], EdgeForm[ Directive[RGBColor["#383a40"], Thickness[.009], JoinForm["Round"]]], Polygon[verts]}, PlotRange -> .8, ImageSize -> 540, Background -> RGBColor["#F9F9F9"]] ]], {t, 0, 2 π}] Answer
Posted 3 years ago
 @Vitaliy Kaurov Very cool, I like the rails a lot.By the way, how do you get the actual Greek letters (rather than just \[Phi] etc.) to show up in the source code in your post? Answer
Posted 3 years ago
 I hope in future we will have it in our technology one way or another. For now I choose for this online app:http://steampiano.net/msc Answer
Posted 3 years ago
 Ah, very nice. Thanks! Answer