Message Boards Message Boards

[GIF] Source (Expanding diamonds)

GROUPS:

Expanding diamonds

Source

Mathematically very simple, though as the title of the still alludes to, I like to think of these as the concentric spheres in the $\ell^1$ norm. The basic form is actually inspired by a stained glass piece my grandfather made several decades ago that I use as a Christmas decoration.

The code is kind of ugly, especially since I'm just covering up the diamonds that get too big:

With[{a = 16, b = 19,
  cols = RGBColor /@ {"#01A2A6", "#29D9C2", "#BDF271", "#2F2933"}},
 Manipulate[
  Graphics[
   {EdgeForm[Directive[Thickness[.001], cols[[-1]]]],
    Table[{cols[[Mod[r, 3, 1]]],
      Polygon[CirclePoints[{Max[r + t, 0], π/2}, 4]]},
     {r, a, 1 - a + 1, -1}],
    cols[[-1]], EdgeForm[None],
    Polygon[{{-b - 1, 1}, {-a, 1}, {-a, 0}, {0, -a}, {a, 0}, {a, 1}, {b + 1, 1}, {b + 1, -b - 1}, {-b - 1, -b - 1}}],
    Polygon[{{-b - 1, -1}, {-a, -1}, {-a, 0}, {0, a}, {a, 0}, {a, -1}, {b + 1, -1}, {b + 1, b + 1}, {-b - 1, b + 1}}]},
   PlotRange -> b, ImageSize -> 540, Background -> cols[[-1]]],
  {t, 0, 3}]
 ]
POSTED BY: Clayton Shonkwiler
Answer
11 months ago

enter image description here - Congratulations! This post is now Staff Pick! Thank you for your wonderful contributions. Please, keep them coming!

POSTED BY: Moderation Team
Answer
11 months ago

Group Abstract Group Abstract