Message Boards Message Boards

[GIF] Twist (Spinning lines)

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

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: EDITORIAL BOARD
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