Documentation ¶
Index ¶
- func B1(z, c, _ complex128) complex128
- func B2(z, c, _ complex128) complex128
- func BurningShip(z, c, _ complex128) complex128
- func Converged(z, c complex128, orbit *fractal.Orbit, frac *fractal.Fractal) int64
- func DistToLine(z, p0, dir complex128) float64
- func Escaped(z, c complex128, orbit *fractal.Orbit, frac *fractal.Fractal) int64
- func EscapedLast(z, c complex128, frac *fractal.Fractal) (complex128, int64)
- func FieldLines(z, c complex128, orbit *fractal.Orbit, frac *fractal.Fractal) int64
- func FieldLinesEscapes(z, c complex128, frac *fractal.Fractal, g float64) (complex128, int64)
- func IsCycle(z complex128, bfract *complex128, i int64) bool
- func IsInBulb(c complex128) bool
- func IsOutside(z complex128, bail float64) bool
- func Line(p0, dir complex128) func(complex128) float64
- func Mandelbrot(z, c, coef complex128) complex128
- func Monk(z, c, _ complex128) complex128
- func OrbitTrap(z, c complex128, frac *fractal.Fractal, trap func(complex128) float64) (dist float64, closest complex128)
- func Pickover(p complex128) func(complex128) float64
- func Point(trap complex128) func(complex128) float64
- func Primitive(z, c complex128, orbit *fractal.Orbit, frac *fractal.Fractal) (i int64)
- func Wrench(z, c, _ complex128) complex128
- type Registrer
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 ¶
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 ¶
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 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 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.