Message Boards Message Boards

GROUPS:

[GIF] Obfuscate (Repeated pattern)

Posted 2 years ago
1191 Views
|
0 Replies
|
2 Total Likes
|

Repeated minimal pattern

Obfuscate

A simple one tonight: a riff on this Daily Minimal piece.

Code:

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

Manipulate[
 Graphics[{FaceForm[None], 
   EdgeForm[
    Directive[GrayLevel[45/255], JoinForm["Round"], 
     Thickness[.0065]]], 
   If[n >= 1, 
    Table[basicblock[{0, 0}, θ + π/6.], {θ, 
      0., (n - 1) π/(3 n), π/(3 n)}]]}, PlotRange -> 3.5, 
  ImageSize -> 540, Background -> RGBColor[{242, 240, 241}/255]], {n, 
  0, 30, 1}]
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