Skip to content
projects

mandelrust

rendering…

what?

i basically wanted to have a random zoom on an interesting mandelbrot point:

code
-0.761574 + -0.0847596i 

why?

  • i wanted to try out rust in an aws lambda function
  • i wanted to build that lambda function with cdk (i'm kinda procrastinating from learning/using terraform)
  • i was kinda hyped to use rust after reading about it

conclusions

  • i'm starting to dig aws hehe.
  • i really like rust and will keep using it as much as i can
  • i will never ever find mandelbrot set uninteresting
  • rust lambda startup time is unlike anything i've ever seen. it draws (for me, at least) the line between server and serverless kinda blurry

todo

  • well this seems obvious but i don't want to use a single point and a random zoom but rather a set of interesting points and a random zoom! all this seems kinda time consuming so i guess i'll leave it like this for a while
  • i also want to optimize mb allocated for each lambda execution. 128mb takes arround 13 seconds to finish, while 1gb takes arround 3.

update 10-5-2022

  • i've been consuming a lot of terraform content. but as you may know by now, in the realm of programming you learn mostly by getting your hands dirty, so i tried importing (this is the single feature i liked the most) most of the resources i used on cdk and got them up & running in terraform. it is beautiful.

update 14-10-2026

  • crossed off the first todo: instead of a single point, every request now zooms into one of 45 points on the boundary of the set
  • 37 of them are minibrots (tiny copies of the whole set) found with newton's method. each comes with an estimate of its size, so the zoom stops once the minibrot is framed instead of sinking into black
  • the other 8 are misiurewicz points: spirals and stars that look the same however deep you go
  • turns out the old point was slightly outside the set, which is why zooms past ~1,000,000 were just flat gray
  • deeper frames get more iterations, and the shading is spread over each frame's own range of escape counts
  • the demo lives right on this page now (it's still at /mandelrust/ full screen) and picks a random zoom between 100× and 50,000,000,000× instead of 1× to 10,000×

links