Message Boards Message Boards

GROUPS:

[GIF] Trifolium (Envelope of the trifolium curve)

Posted 1 year ago
1902 Views
|
1 Reply
|
6 Total Likes
|

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!

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