Message Boards Message Boards

GROUPS:

[GIF] Closing In (Hexagonal tiling morph)

Posted 2 years ago
2624 Views
|
1 Reply
|
4 Total Likes
|

Hexagonal tiling morph

Closing In

I kind of like the contrast between the hexagonal lattice and the square image shape in this one.

Code:

DynamicModule[{ϕ, xpos, ypos, cols},
 cols = RGBColor /@ {"#03C1EB", "#86F3B8", "#482D57"};
 Manipulate[Graphics[Table[
    {xpos, ypos} = {Sqrt[3] x + (-1)^y Sqrt[3]/4, 3 y/2};
    ϕ = 2 π/3 (Haversine[Clip[#, {0, π}]]) &[t - π/8 Max[Abs[xpos], Abs[ypos]]];
    {Blend[cols[[;; 2]], Sin[3 ϕ/2]], CapForm["Round"], 
     Thickness[.01], 
     Line[1.2 ({xpos, ypos}) + # & /@ {.2 {Cos[θ + ϕ], Sin[θ + ϕ]}, 
          {Cos[θ + ϕ], Sin[θ + ϕ]}}]}, 
     {x, -5, 5}, {y, -5, 5}, {θ, π/6, 3 π/2, 2 π/3}], PlotRange -> 9, 
   ImageSize -> 540, Background -> cols[[3]]], {t, 2 π, 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 tops of the "Featured Contributor" board. Thank you for your wonderful contributions, and please keep them coming!

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