mandelbrot

package
v0.0.0-...-8ecb2f4 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Calculator

type Calculator struct {
	// contains filtered or unexported fields
}

Calculator has methods for performing core mandelbrot operations. This class is thread-safe.

func NewQuadraticCalculator

func NewQuadraticCalculator(maxIterations int) *Calculator

NewQuadraticCalculator returns a Calculator which classifies members for the classic mandelbrot set.

func (*Calculator) Score

func (c *Calculator) Score(p complex128) float64

Score returns a value between 0 and 1 for the probability that p is in the Mandelbrot set.

type Tile

type Tile struct {
	// contains filtered or unexported fields
}

Tile represents a rectangular area in the complex number plane.

func NewTile

func NewTile(topLeft, bottomRight complex128, rows, cols int) Tile

NewTile makes a new Tile for the specified area, with the given resolution.

func (*Tile) Calculate

func (t *Tile) Calculate(c *Calculator) [][]float64

Calculate returns the result of scoring each cell in this tile. (0,0) is the top left, (cols-1, rows-1) is the bottom right.

Jump to

Keyboard shortcuts

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