fractal_core

package module
v0.0.0-...-c5afe6e Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: MIT Imports: 3 Imported by: 0

README

Fractals in Go

So far this is a Mandelbrot set image generator and crude fractal zoom engine.

Mandelbrot Set

Documentation

Index

Constants

View Source
const DefaultMaxIterations = 1000
View Source
const DefaultZoomLevel = 0.5

Variables

This section is empty.

Functions

func Generate

func Generate(m *Mandelbrot)

func GetBounds

func GetBounds(m *Mandelbrot) (float64, float64, float64, float64)

Return x min, y min, x max, x max of the current view

func GetBuffer

func GetBuffer(m *Mandelbrot) [][]uint32

func GetHistogram

func GetHistogram(m *Mandelbrot) []uint32

func GetHue

func GetHue(m *Mandelbrot) [][]float64

func GetMaxIterations

func GetMaxIterations(m *Mandelbrot) int

func GetZoom

func GetZoom(m *Mandelbrot) float64

func InterpColors

func InterpColors(colorA, colorB uint32, hue float64) (uint8, uint8, uint8)

func MapFloatToFloat

func MapFloatToFloat(v, aMin, aMax, bMin, bMax float64) float64

func MapIntToFloat

func MapIntToFloat(v, intMin, intMax int, floatMin, floatMax float64) float64

func MapIntToInt

func MapIntToInt(v, aMin, aMax, bMin, bMax int) int

func ScaleZoom

func ScaleZoom(m *Mandelbrot, scale float64)

func SetCenter

func SetCenter(m *Mandelbrot, center complex128)

func SetMaxIterations

func SetMaxIterations(m *Mandelbrot, i int)

func SetZoom

func SetZoom(m *Mandelbrot, z float64)

Types

type Mandelbrot

type Mandelbrot struct {
	ImageWidth  int
	ImageHeight int
	// contains filtered or unexported fields
}

func Create

func Create(width, height int, center complex128) *Mandelbrot

Jump to

Keyboard shortcuts

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