Message Boards Message Boards

[GIF] Reversible (String art)

String art

Reversible

Just a simple string art animation.

The code:

DynamicModule[{n = 12, r, j = 1, k = 1, cols, verts},
 cols = RGBColor /@ {"#FFFFFF", "#303841"};
 Manipulate[
  r = Cos[s];
  verts = 
   Table[(1 - r (-1)^(i + 1)) ReIm[
      E^(I (2 ? i/n - ? (r)/n - ?/12))], {i, 0, n - 1}];
  Graphics[{Thickness[.005], CapForm["Round"], Opacity[1/3], 
    Table[{First[cols], 
        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/12]}, PlotRange -> 3, 
   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!

POSTED BY: Moderation Team
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