Message Boards Message Boards

GROUPS:

[GIF] Running in Place (String art animation)

Posted 2 years ago
2450 Views
|
1 Reply
|
3 Total Likes
|

String art animation

Running in Place

Continuing to use essentially the same code as in Reversible, Come Back, and Transition, namely:

DynamicModule[{n = 6, k = 1, j = 3, r, cols, verts},
 cols = RGBColor /@ {"#F9A1BC", "#A9EEE6", "#625772"};
 Manipulate[
  r = Cos[s];
  verts = 
   Table[(1 - r (-1)^(i + 1)) ReIm[
      E^(I (2 π i/n - π r/n + π))], {i, 0, n - 1}];
  Graphics[{Thickness[.004], CapForm["Round"], 
    Opacity[1/3 + 1/6 Haversine[2 s]], 
    Table[{Blend[cols[[;; 2]], t], 
        Line[{t verts[[i]] + (1 - t) RotateRight[verts, j][[i]], 
          t RotateLeft[verts, k][[i]] + (1 - t) RotateLeft[verts, 
              k + 1][[i]]}]}, {i, 1, n - 1, 2}, {t, 0, 1 - #, #}] &[
     1/40]}, PlotRange -> 2.5, ImageSize -> 540, 
   Background -> Last[cols]], {s, 0, π}]
 ]

enter image description here - another post of yours has been selected for the Staff Picks group, congratulations !

We are happy to see you at the top of the "Featured Contributor" board. Thank you for your wonderful contributions, and please keep them 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