Message Boards Message Boards

[GIF] Trifolium (Envelope of the trifolium curve)


Envelope of the trifolium curve


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.},
    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}]
POSTED BY: Clayton Shonkwiler
9 months ago

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: Moderation Team
9 months ago

Group Abstract Group Abstract