Message Boards Message Boards

[GiF] Envelope (String art)

Envelope

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

enter image description here -- you have earned Featured Contributor Badge enter image description here 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!

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