Message Boards Message Boards

GROUPS:

[GiF] Mandelzoom one-liner

Posted 9 months ago
2709 Views
|
4 Replies
|
19 Total Likes
|

Hey Wolfram Community. I'm always continually enthused by how concise mathematica code can be. I was looking over my collection of 1-liners and found this old gem. I would like to see any other language do this is as many characters:

enter image description here

Here's the code:

w = {-{3, 1}, {1, 1}};
Dynamic[w = ScalingTransform[.96 {1, 1}, {-1.56, 0}]@w;
 ImageAdjust@MandelbrotSetPlot[Complex @@@ w, Frame -> None]]

Challenge: can you tweak the parameters to make it loop around?

And here's code to export the above gif:

w = {-{3, 1}, {1, 1}};
AbsoluteTiming[
 f = Table[Do[w = ScalingTransform[.98 {1, 1}, {-1.56, 0}]@w;, 4];
    MandelbrotSetPlot[Complex @@@ w, Frame -> None, PlotRangePadding -> 0,
      ImageResolution -> 1000, MaxIterations -> 100, EscapeRadius -> 10000, 
     ColorFunction -> ColorData["SunsetColors"], PerformanceGoal -> "Quality"], {300}];]
Export["mz.gif", f, "DisplayDurations" -> Table[.05, Length@f], ImageResolution -> 500]
4 Replies

Very nice, thanks for sharing!

Challenge: can you tweak the parameters to make it loop around?

I did not know it is possible to loop the Mandelbrot Set zoom. I thought there are very similar zoomed regions but not quite the same as original-zoom set.

Hi @Kapio Letto, Thanks for the shout out! Indeed, it's a rather cool fact that it contains exactly self-similar pieces:

enter image description here

It would repeat itself infinitely with the right zoom point, but in the above example it manages only twice (before the numerical issues break the pattern).

enter image description here - Congratulations! This post is now a Staff Pick as distinguished by a badge on your profile! Thank you, keep it coming!

Nice one-liner! I can just sit here and stare at it for hours!

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