Message Boards Message Boards

Probability Theory of Random Polygons from the Quaternionic Viewpoint

WOLFRAM MATERIALS for the ARTICLE:

Cantarella, J., Deguchi, T. and Shonkwiler, C. (2014),

Probability Theory of Random Polygons from the Quaternionic Viewpoint.

Commun. Pur. Appl. Math., 67: 1658-1699.

https://doi.org/10.1002/cpa.21480

https://arxiv.org/abs/1206.3161v2

Updated figure (see discussion below):

enter image description here

Original figure:

one-parameter family of triangles

Article abstract

In 1997, Jean-Claude Hausmann and Allen Knutson introduced a natural and beautiful correspondence between planar n-gons and the Grassmann manifold of 2-planes in real n-space. This construction leads to a natural probability distribution and a natural metric on polygons which has been used in shape classification and computer vision. In this paper, we provide an accessible introduction to this circle of ideas by explaining the Grassmannian geometry of triangles. We use this to find the probability that a random triangle is obtuse, which was a question raised by Lewis Carroll. We then explore the Grassmannian geometry of planar quadrilaterals, providing an answer to Sylvester’s four-point problem, and describing explicitly the moduli space of unordered quadrilaterals.

Isometries

In 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]}]
6 Replies

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][4]" 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][1]) $O(n)$ produces what you'd expect, but writing $O(n)$ ([link][1]) $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).

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:

enter image description here

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 ?}]
POSTED BY: Vitaliy Kaurov

@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?

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

POSTED BY: Vitaliy Kaurov

Ah, very nice. Thanks!

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