algos

package
v0.0.0-...-5f8515d Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package algos contains fractal algorithms

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Algo

type Algo func(re, im, iter float64) float64

Algo represents a specific fractal algorithm called on each rendered point of a complex plane. The functions in this package all return other functions that are used in the iterators to process each pixel.

func Checker

func Checker(cp *complexplane.ComplexPlane, res float64) Algo

Checker just generates a checkerboard pattern. Not actually a fractal at all, but useful for debugging warpers.

func Duck

func Duck(cr, ci float64) Algo

Duck returns a fractal duck algorithm. The cr and ci params define the complex number c used in the algorithm. z if formed from the r and i params of the inner function.

func Julia

func Julia(cr, ci float64) Algo

Julia returns a basic Julia algorithm. cr and ci are the complex components of c.

func Kali

func Kali(cr, ci, bailOut float64) Algo

Kali returns a kali fractal function.

func Mandel

func Mandel() Algo

Mandel returns a basic Mandelbrot algorithm. There are no customizable parameters for this algorithm. This is because c is formed from the r and i params of the inner function. And z is always 0 + 0i.

func NovaBase

func NovaBase(power, bailOut float64) Algo

NovaBase returns a nova fractal function. This version has perfect radial symmetry. power generally determines how many arms are created. smaller bailOut usually makes for a more complex image. You might go down to 0.00001 or lower

func NovaRelaxed

func NovaRelaxed(zr, zi, rxr, rxi, power, bailOut float64) Algo

RelaxedNova returns a nova fractal function with a relaxation param. power generally determines how many arms are created. zr and zi are the components of z. rxr and rxi are the components of the complex relaxation. smaller bailOut usually makes for a more complex image. You might go down to 0.00001 or lower

func NovaZ

func NovaZ(zr, zi, power, bailOut float64) Algo

NovaZ returns a nova fractal function. This version lets you set the inital values of z. power generally determines how many arms are created. smaller bailOut usually makes for a more complex image. You might go down to 0.00001 or lower

func Rings

func Rings(cp *complexplane.ComplexPlane, res float64) Algo

Rings just generates a ring pattern. Not actually a fractal at all, but useful for debugging warpers.

Jump to

Keyboard shortcuts

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