Posts tagged: countable infinity

Each snowflake is algorithmically generated using some randomness to create infinitely many snowflakes where no two are exactly alike.

Mathematica code:

rr[n_] := (SeedRandom[n]; RandomReal[])H = Table[{Cos[n*Pi/3], Sin[n*Pi/3]}, {n, 0, 5, 1}];SnowFlake[Q_, x_, y_, R_, S_, k_, h_, o_, s_, N_, PR_, IS_] :=  Graphics[{   Rotate[    Translate[     Scale[      Table[       Table[        Rotate[         Translate[          Scale[           Table[            {AbsoluteThickness[k*h^(n - 1)], Opacity[o], White,             Line[              {{0, 0}, H[[i]]}]},            {i, 1, 6, 1}],           s^(n - 1)],          {If[n == 1, 0, rr[Q*n]], 0}],         If[n == 1, 0, (j + rr[Q*n])*Pi/3], {0, 0}],        {j, 0, 5, 1}],       {n, 1, N, 1}],      S],     {x, y}],    R, {x, y}]},  PlotRange -> PR, ImageSize -> IS, Background -> Black]Manipulate[ SnowFlake[Q, 0, 0, rr[2 Q] Pi/3, 1, k, h, o, s, N, 2, 500], {Q, 1, 1000, 1}, {{k, 1}, 0, 2}, {{h, .9}, 1, 0}, {{o, .75}, 1, 0}, {{s, .75}, 1, 0}, {{N, 10}, 1, 20, 1}]Manipulate[GraphicsGrid[   Table[    SnowFlake[Q*W, 0, 0, (-1)^(Round[rr[4 Q*W]]) (t + rr[2 Q*W]) Pi/3,              1, 1, .85, .8, .5 + .2 rr[3 Q*W], 15, 2, 100],   {Q, q, q+6, 1}, {W, w, w+4, 1}], Background -> Black, ImageSize -> {500, 700}, AspectRatio->7/5],{q, 1, 100, 1}, {w, 1, 100, 1}, {t, 0, 1 - 1/25, 1/25}]