wasabi

module
v0.0.0-...-414057b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2020 License: Unlicense

README

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.

Directories

Path Synopsis
Package blueprint enables the creation of render files for artworks of buddhabrots and it's family members.
Package blueprint enables the creation of render files for artworks of buddhabrots and it's family members.
Package buddha provides functions for high performance parallel rendering of the buddhabrot fractal and it's complex cousins.
Package buddha provides functions for high performance parallel rendering of the buddhabrot fractal and it's complex cousins.
cmd
Package coloring contains utility functions useable when drawing any fractal.
Package coloring contains utility functions useable when drawing any fractal.
Package histo implements a histogram with persistent save and load features.
Package histo implements a histogram with persistent save and load features.
Package iro provides color interpolation functionality for multiple color spaces and convertions between them.
Package iro provides color interpolation functionality for multiple color spaces and convertions between them.
Package plot converts histograms into an image.
Package plot converts histograms into an image.
Package render bundles render relevant information.
Package render bundles render relevant information.
Package util implements functions for output and other non-fractal related functionality.
Package util implements functions for output and other non-fractal related functionality.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL