Skip to content
/ wasabi Public

A Buddhabrot explorer based on wabisabi, but with a more affectionate name.

License

Notifications You must be signed in to change notification settings

karlek/wasabi

Repository files navigation

Wasabi

Maintainability

Wasabi is a renderer of buddhabrot and its family members. It used to share its name with a Japanese aesthetic called Wabi-sabi. Referencing the impossibility of creating the real buddhabrot and learning to accept the beauty in reality and its flaws. However, the affectionate nickname wasabi soon replaced it.

Showcase

To the left, an original buddhabrot and to the right an anti-buddhabrot.

To the left an image of the linear calculation path rendering technique, and to the right a second degree bezier interpolation.

It's also possible to plot the other capital planes of the complex space. I created a new method to visualize angles between points inside orbits

There are multiple ways to tweak the complex functions.

The project has rendered a few visually interesting bugs.

To the left an point orbit trap around origo, and to the right off-center.

Histogram merging, i.e plotting multiple renders on the same canvas.

One of the more famous of my renders ;)

Features

  • Calculating the original, anti- and primitive- buddhabrot.
  • Exploring the different planes of Zr, Zi, Cr and Ci.
  • Modular design for easier exploration of the complex function space.
  • Histogram equalization functions to control image exposure.
  • Cache histograms for faster exposure tweaking.
  • Parallel computing for all heavy calculations.
  • Plot calculation-paths. Credits to Raka Jovanovic and Milan Tuba (ISSN: 1109-2750).
  • Plot orbit angle distribution.
  • Hand optimized assembly(!) for generating random complex points. Thank you 7i!

It should be noted that speed in random number generating algorithms competes with the necessity of having a random distribution. If you know of a way to benchmark randomness as well as speed, please create an issue!

Benchmark

Install

$ go build github.com/karlek/wasabi/cmd/wasabi

Run

# Be sure to limit the memory usage beforehand; wasabi is greedy little devil.
$ ulimit -Sv 4000000 # Where the number is the memory in kB.
$ wasabi blueprint.json

Tips

For doing animations I recommend writing a simple shell script. I use jq to iteratively update the blueprint and fish as my shell of preference. My scripts usually looks like this:

# Animation of the real coefficient.
for i in (seq -1 0.1 1)
	jq ".realCoefficient = $i" < wimm.json > /tmp/a.json
	wasabi -out "$i" /tmp/a.json 
end

Contributing

The easiest way to contribute is to find a new interesting complex function or z/c-sampling strategy. Please make a pull request with a pretty image and the blueprint.json.

Public domain

I hereby release this code into the public domain.

About

A Buddhabrot explorer based on wabisabi, but with a more affectionate name.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages