Message Boards Message Boards

[GIF] Twist (Spinning lines)

GROUPS:

Spinning lines

Twist

Very simple one this time. 100 points on the unit circle, each with a line segment passing through it, all rotating at the same speed but at different initial angles (the initial angles make 1.5 additional rotations relative to the radial line).

Here's the code:

With[{n = 100},
 Manipulate[
  Graphics[
   {CapForm["Round"], Thickness[.004],
    Table[
     {Hue[Mod[θ + t, 2 π]/(2 π)], 
      Line[{#, #} + RotationTransform[3/2 θ + t][.4 {-#, #}]] &[{Cos[θ], Sin[θ]}]},
     {θ, 0, 2 π - 2 π/n, 2 π/n}]},
   PlotRange -> 2, ImageSize -> 540, Background -> GrayLevel[.15]],
  {t, -π/4, 2 π - π/4}]
 ]
POSTED BY: Clayton Shonkwiler
Answer
3 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
Answer
2 months ago

Group Abstract Group Abstract