Message Boards Message Boards

GROUPS:

[GIF] Snap to Grid (Deforming the square grid)

Posted 5 years ago
2761 Views
|
1 Reply
|
5 Total Likes
|

Deforming the square grid

Snap to Grid

Source code:

DynamicModule[{r, s, cols},
 cols = RGBColor /@ {"#A9EEE6", "#F38181", "#625772"};
 Manipulate[Graphics[{CapForm["Round"], Thickness[.005],
    Table[
     r = 2 x + 1/2 + (-1)^y/2 + 6;
     s = ?/4 Total[
        Haversine[Clip[t - ?/12 r, #]] & /@ {{0, ?}, {2 ?, 3 ?}}];
     {Blend[cols[[;; 2]], Sin[2 s]],
      Line[{2 x + 1/2 + (-1)^y/2, y + (-1)^y} + # & /@ {{0, 0}, 
          {Cos[? + (-1)^y  s], Sin[? + (-1)^y  s]}}]}, 
      {x, -3, 2}, {y, -6, 5}, {?, 0, 3 ?/2, 2 ?/4}]}, 
   PlotRange -> {{-5.01, 5.025}, {-5.025, 5.01}}, ImageSize -> 540, 
   Background -> cols[[3]]], {t, 0, 4 ?}]]

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!

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