Message Boards Message Boards

[GIF] Stay Connected (Rhombus tiling deformation)

Rhombus tiling deformation

Stay Conneted

I just got an invite to Dribbble and, as I was picking a few recent GIFs to upload, I looked again at Reinvention and immediately wanted to make a combination of that and of Obfuscate. Not sure I entirely succeeded, but this is the result.

Here's the code:

rhombus[{x_, y_}, ?_, ?_] := 
  Polygon[{x, y} + # & /@ 
      Prepend[{#[[1]], #[[1]] + #[[2]], #[[2]]}, {0, 
        0}] &[{{Cos[?], 
      Sin[?]}, {Cos[? + ?], 
      Sin[? + ?]}}]];
basicblock[{x_, y_}, ?_, t_, n_] := 
 Table[{rhombus[{x, y}, ?, ? + t], 
   rhombus[{x + Cos[? + t] + Cos[? + t + ?], 
     y + Sin[? + t] + 
      Sin[? + t + ?]}, ?, ? + 
     2 ?/3]}, {?, 0, 2 ? - 2 ?/n, 2 ?/n}]

DynamicModule[{cols},
 cols = {RGBColor[
   0.7254901960784313, 0.9137254901960784, 0.21568627450980393`], 
   RGBColor[
   0.11372549019607843`, 0.16862745098039217`, 0.3254901960784314]};
 Manipulate[
  Graphics[{FaceForm[None], 
    EdgeForm[
     Directive[cols[[1]], JoinForm["Round"], Thickness[.00375]]], 
    Table[basicblock[{3 x + 3/4 (-1)^y , 3 Sqrt[3]/2 y}, 
       2 ?/3 Haversine[t] - ?/3, 0, 6][[;; ;; 2]], {x, -3, 
      3}, {y, -3, 3}]}, 
   PlotRange -> {{-15/2 + 3/4, 15/2 + 3/4}, {-7/2 Sqrt[3], 
      4 Sqrt[3]}}, ImageSize -> 540, Background -> cols[[2]]], {t, 
   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