Message Boards Message Boards

[GIF] Group Work (Families of rhombuses)

GROUPS:

Families of rhombuses

Group Work

Continuing to riff on this basic idea (cf. 1, 2). 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 /@ {"#A9EEE6", "#FEFAEC", "#F38181", "#625772"};
 Manipulate[
  Graphics[{FaceForm[None], 
    EdgeForm[Directive[JoinForm["Round"], Thickness[.0065]]], 
    Table[{EdgeForm[cols[[Mod[x + y + Floor[y/2], 3, 1]]]], 
      basicblock[{4 x + (-1)^y, 2 Sqrt[3] y}, 2 π Haversine[t], 0,
         3][[;; , 2]]}, {x, -3, 3}, {y, -3, 3}]}, 
   PlotRange -> {{-9, 11}, {-6 Sqrt[3] - .1, 6 Sqrt[3] - .1}}, 
   ImageSize -> 540, Background -> cols[[4]]], {t, 0, π}]
 ]
POSTED BY: Clayton Shonkwiler
Answer
1 year ago

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!

POSTED BY: Moderation Team
Answer
1 year ago

Group Abstract Group Abstract