Message Boards Message Boards

GROUPS:

[GIF] Follow Through (Morphing 11-pointed star)

Posted 5 months ago
733 Views
|
1 Reply
|
2 Total Likes
|

Morphing 11-pointed star

Follow Through

Put down points at multiples of $4\pi/11$, with each repeated, and form the resulting star. Then linearly interpolate the $i$th point with the $(i+9)$th point.

Here's the code:

smootheststep[t_] := -20 t^7 + 70 t^6 - 84 t^5 + 35 t^4;

DynamicModule[{n = 11, t, cols = RGBColor /@ {"#111F4D", "#F4F4F4"}},
 Manipulate[
  t = smootheststep[s];
  Graphics[{cols[[1]],
    Polygon[
     (1 - t) # + t RotateLeft[#, n - 2]
       &[Riffle[#, #] &[Table[{Cos[θ], Sin[θ]}, {θ, π/2, 4 π + π/2 - 4 π/n, 4 π/n}]]]]}, 
   PlotRange -> Sqrt[2], ImageSize -> 540, Background -> cols[[-1]]],
  {s, 0, 1}]
 ]

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