# [GIF] Go Deeper (Whirl infinite zoom)

Posted 3 years ago
4853 Views
|
|
6 Total Likes
| Go DeeperFollowing up on Step Out, this is a classic whirl with the twist of making it into an infinite zoom, which I've always wanted to do but never had a good idea for.If you look at the code, you'll see a weird weight factor of $w=0.22448400191341356$, meaning that at each level of recursion the vertices of the triangle at that level lie at a fraction $0.22448400191341356/2 = 0.11224200095670678$ of the way along an edge of the triangle at the previous level. This weight factor ensures that the whole whirl is self-similar (without having to rotate the orientation) with a scaling factor of $\approx 24.442985761484984$.I found this weight in a pretty simple-minded way, by just turning the weight into a Manipulate parameter, playing around until it was approximately self-similar, then finding a more precise answer using NSolve.Anyway, I think that's probably the only super-mysterious part of the code: WeightedMidpoints[pts_, w_] := Mean[({w #, (2 - w) RotateLeft[#]} &)[pts]] DynamicModule[{n = 3, w = 0.22448400191341356, depth = 150, cols = {Black, White}, a, pts, t}, pts = CirclePoints[n]; a = Nest[WeightedMidpoints[#, w] &, CirclePoints, 18][[3, 2]]; Manipulate[ Graphics[{ Table[{ FaceForm[If[OddQ[i], cols[], cols[]]], Polygon[#[[i]]]}, {i, 1, Length[#]}] &@NestList[WeightedMidpoints[#, w] &, pts, depth]}, PlotRange -> E^(s Log[a]), ImageSize -> 540], {s, 1, 2}] ] Answer - Congratulations! This post is now Staff Pick! Thank you for your wonderful contributions. Please, keep them coming! Answer