[GiF] Envelope (String art)

string14c.gif

Envelope

Continuing with a theme .

Code:

ToReal[z_] := {Re[z], Im[z]};
ToComplex[{x_, y_}] := x + I y;

pod[θ_, axis_] := Module[{normalizedAxis, perp},
   normalizedAxis = Normalize[axis];
   perp = ToReal[-I*ToComplex[normalizedAxis]];
   Line[{Cos[θ] normalizedAxis, Sin[θ] perp}]
   ];

Manipulate[Module[{cols},
  cols = RGBColor /@ {"#F7FDB6", "#21825C"};
  Graphics[{cols[[1]], Thickness[.001], 
    Table[Line[{{-Sin[t], 0}, {0, Cos[t]}, {Sin[t], 0}}], {t, 
      0, Pi, Pi/76}], Thickness[.0025], 
    pod[θ, #] & /@ {{0, 1}, {0, -1}}}, PlotRange -> 1.5, 
   ImageSize -> 540, Background -> cols[[2]]]], {θ, 0, Pi}]
9 Likes

news-congrads-kkluyshnik-02-04-19.jpg – you have earned Featured Contributor Badge 2015-11-02_10-07-11.png
Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!