Message Boards Message Boards

[GIF] Isogonal (Isogonal conjugates of edge parallels)

Isogonal conjugates of edge parallels

Isogonal

Take the isogonal conjugates of lines parallel to a triangle's edges, then let the lines translate parallel to themselves; the result is the above animation. Here's the code:

SideVectors[?_] := (#[[2]] - #[[1]]) & /@ 
   Transpose[{?[[1]], RotateLeft[?[[1]]]}];

SideLengths[?_] := Norm /@ SideVectors[?];

BarycentricCoords[?_, t_] := 
  Sum[t[[i]] ?[[1, i]], {i, 1, 3}]/Total[t];
TrilinearCoords[?_, {?_, ?_, ?_}] := 
  Module[{a, b, c},
   {a, b, c} = SideLengths[?];
   BarycentricCoords[?, {? a, ? b, \
? c}]
   ];

EquilateralTriangle = Triangle[{{0, 0}, {1, 0}, {1/2, Sqrt[3]/2}}];

isogonal = 
  With[{cols = 
     RGBColor /@ {"#FF5964", "#6BF178", "#35A7FF", "#333333"}, 
    n = 9},
   ParallelTable[ImageMultiply @@
       Append[
        Flatten[
         Table[

          ParametricPlot[
           TrilinearCoords[EquilateralTriangle, 
            RotateLeft[
             1/{i + s/n, (1 - i - s/n) t, (1 - i - s/n) (1 - t)}, 
             j]],
           {t, .00001, .99999}, 

           PlotStyle -> 
            Directive[CapForm[None], Thickness[.006], Opacity[.5], 
             cols[[j + 1]]], ImageSize -> 1080, Background -> White, 
           Axes -> False, 
           PlotRange -> {{-1/8, 9/8}, {Sqrt[3]/4 - 5/8, 
              Sqrt[3]/4 + 5/8}}],
          {j, 0, 2}, {i, 0., 1 - 1/n, 1/n}]],
        Graphics[{FaceForm[None], 
          EdgeForm[
           Directive[JoinForm["Round"], Thickness[.006], cols[[-1]]]],
           EquilateralTriangle},
         PlotRange -> {{-1/8, 9/8}, {Sqrt[3]/4 - 5/8, 
            Sqrt[3]/4 + 5/8}}, Background -> GrayLevel[.95]]],
      {s, .00001, .99999 - #, #}] &[.99998/100]
   ];

Export[NotebookDirectory[] <> "isogonal.gif", 
 Reverse[RotateRight[isogonal, 1]], "DisplayDurations" -> {1/24}]

enter image description here - Congratulations! This post is now Staff Pick! Thank you for your wonderful contributions. Please, keep them coming!

POSTED BY: EDITORIAL BOARD
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