Message Boards Message Boards

[GIF] Trifolium (Envelope of the trifolium curve)

Envelope of the trifolium curve

Trifolium

The animation shows 800 tangent lines to the trifolium as they slowly move around the curve. In order to make it, I first ran PlaneCurveData["Trifolium", "ParametricEquations"] to get the parametrization, which I then rotate to get a vertically-oriented trifolium:

tri[t_] := RotationMatrix[?/6].{-Cos[t] Cos[3 t], -Cos[3 t] Sin[t]};

After that, it's just a matter of creating the tangent lines with InfiniteLine[] and choosing some colors. Here's the code:

With[{d = 2 ?/800.},
 Manipulate[
  Show[
   Table[
    Graphics[{Thickness[.001], Opacity[.8], Hue[Mod[(s + t)/?, 1]],
      InfiniteLine[tri[t + s], tri'[t + s]]},
     PlotRange -> {{-1.4, 1.4}, {-1.18125`, 1.61875`}}],
    {t, 0., ? - d, d}],
   ImageSize -> 540, Background -> GrayLevel[.1]],
  {s, 0, d}]
 ]

enter image description here - Congratulations! This post is now a Staff Pick as distinguished by a badge on your profile! Thank you, keep it 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