Introducing: mandelbulb.js

Introducing: mandelbulb.js

This afternoon Will (the friend I mentioned in this previous post) showed up again on Google Talk.
He set me a new challenge: “How about translating your 3d engine/mandelbulb code into pure Javascript?”

First Mandelbulb render, full of programming bugs

This seemed impossible, but I quickly realized the code I had was very easy to convert. It is my first piece of Javascript larger than 10 lines I think, but it is working!

If you have a bit of time:


Any Javascript developers who would like to take the code and improve on it (trust me, there is more then enough room for improvement) go ahead! I’m releasing it under creative commons, do with it what you like, just be sure to mention me!

The code can be found here:

I’ve already included one improvement by Will himself, scanlines to smooth up the rendering (good for inpatient people!).