Skip to content

donghaoren/buddhabrot-renderer

Repository files navigation

Buddhabrot Renderer

A realtime Buddhabrot fractal renderer. Two versions are implemented here:

  • Browser version based on WebGL 2 and transform feedback.
  • Native version using OpenGL 3.3 and geometry shader.

Live Demo Here

Gallery Image

Build WebGL Version

# Install dependencies first:
npm install

# Build the WebGL version
npm run build

Open index.html and enjoy.

Watch development:

npm run watch

There's also an electron version which allows exporting animations as videos. You can run it by:

npm run electron

You'll need to install ffmpeg for this feature to work. The "Export Video" button will produce a video.mp4 file in the current directory. Here's a sample video: https://vimeo.com/266017672

Build Native Version

# Install native dependencies (here for Mac OS X)
brew install glfw
brew install glew
brew install liblo

# Build with the makefile under "native"
cd native
make

# Run it with
./renderer

OSC Control: The native version receive its parameters via the OSC protocol. osc_example.js is a sample for how to send messages to it.

References

The colormaps used in this project are from these sources:

Melinda Green's The Buddhabrot Technique contains a lot of useful links to the buddhabrot method.

License

Copyright 2018 Donghao Ren

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to
do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.