mandel

package
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 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func B1

func B1(z, c, _ complex128) complex128

func B2

func B2(z, c, _ complex128) complex128

func BurningShip

func BurningShip(z, c, _ complex128) complex128

func Converged

func Converged(z, c complex128, orbit *fractal.Orbit, frac *fractal.Fractal) int64

Converged returns all points in the domain of the complex function before diverging.

func DistToLine

func DistToLine(z, p0, dir complex128) float64

DistToLine returns the distance between the point z and a line function specified by the direction of the line and a point on the line.

func Escaped

func Escaped(z, c complex128, orbit *fractal.Orbit, frac *fractal.Fractal) int64

Escaped returns all points in the domain of the complex function before diverging. If the orbit converges (or is assumed to converge under the iterations) we discard the orbit.

func EscapedLast

func EscapedLast(z, c complex128, frac *fractal.Fractal) (complex128, int64)

EscapedLast gives us the first point outside the mandelbrot and the number of iterations it took until divergence. These values are used for color coding the quintessential mandelbrot render.

func FieldLines

func FieldLines(z, c complex128, orbit *fractal.Orbit, frac *fractal.Fractal) int64

func FieldLinesEscapes

func FieldLinesEscapes(z, c complex128, frac *fractal.Fractal, g float64) (complex128, int64)

func IsCycle

func IsCycle(z complex128, bfract *complex128, i int64) bool

IsCycle uses exponential back-off for cycle detection.

func IsInBulb

func IsInBulb(c complex128) bool

IsInBulb returns true if the point c is in one of the larger bulb's of the mandelbrot.

Credits: https://github.com/morcmarc/buddhabrot/blob/master/buddhabrot.go

func IsOutside

func IsOutside(z complex128, bail float64) bool

IsOutside checks wheter the point is outside the chosen domain. Bailout should be the square radius.

func Line

func Line(p0, dir complex128) func(complex128) float64

Line calculates the distance between the point and a line given by a point (on the line) and direction.

func Mandelbrot

func Mandelbrot(z, c, coef complex128) complex128

func Monk

func Monk(z, c, _ complex128) complex128

func OrbitTrap

func OrbitTrap(z, c complex128, frac *fractal.Fractal, trap func(complex128) float64) (dist float64, closest complex128)

OrbitTrap returns the smallest distance and it's point from a distance function calculated on each point in the orbit.

func Pickover

func Pickover(p complex128) func(complex128) float64

Pickover calculates the distance between the point and the coordinate axis.

func Point

func Point(trap complex128) func(complex128) float64

Point returns the distance between the point z and the trap point.

func Primitive

func Primitive(z, c complex128, orbit *fractal.Orbit, frac *fractal.Fractal) (i int64)

Primitive returns all points in the domain of the complex function diverging.

func Wrench

func Wrench(z, c, _ complex128) complex128

Types

type Registrer

type Registrer func(complex128, complex128, *fractal.Orbit, *fractal.Fractal) int64

Registrer is a function which registers if the points (z, c) creates an orbit for a specific fractal.

Jump to

Keyboard shortcuts

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