[GIF] Twist (Spinning lines)

l3q.gif

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}]
 ]
4 Likes

2015-11-02_10-07-11.png

  • Congratulations! This post is now a Staff Pick as distinguished by a badge on your profile! Thank you, keep it coming!