[GiF] Descent (Shrinking octagons)

blocks16Dribbblec.gif

Descent

A very simple idea: just a bunch of octagons in the plane, shrinking. I ended up deciding that the 4:3 aspect ratio, while less symmetric than my usual square, actually made it more clear what is going on.

Here’s the code:

With[
 {cols = RGBColor /@ {"#DFF09D", "#295E62"}},
 Manipulate[
    Graphics[
     {cols[[If[r < 2.5, 1, -1]]],
      Table[
       RegularPolygon[3^i {Cos[t], Sin[t]}, {Mod[r, 2.5]^2, 0}, 8], {t, 0, 2 Pi - Pi/8, 2 Pi/8}, {i, -4, 2}]
      },
     PlotRange -> {{-8, 8}, {-6, 6}}, ImageSize -> {800, 600}, Background -> cols[[If[r < 2.5, -1, 1]]]],
    {r, 5. - #, #, -#}] &[5./399]
 ]
6 Likes

news-congrads-kkluyshnik-02-04-19.jpg – you have earned Featured Contributor Badge 2015-11-02_10-07-11.png
Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!