Message Boards Message Boards

[GIF] Reversible (String art)

GROUPS:

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., π}]
 ]
POSTED BY: Clayton Shonkwiler
Answer
11 months ago

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
Answer
11 months ago

Group Abstract Group Abstract