fractal

package
v0.0.0-...-987384b Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePNG

func CreatePNG(r *image.RGBA) *bytes.Buffer

func CreateRGBA

func CreateRGBA(p Palette, r *Result, w int, h int) *image.RGBA

func CreateRGBAOrig

func CreateRGBAOrig(p Palette, r *Result) *image.RGBA

creates image the same size as the result

func CreateRGBASampled

func CreateRGBASampled(p Palette, r *Result, w int, h int) *image.RGBA

creates RGBA of specified size from given result using simple-minded sampling

Types

type Complex

type Complex struct {
	Real, Imag *big.Float
}

func NewComplex

func NewComplex(v complex128) *Complex

func NewComplexParts

func NewComplexParts(real float64, imag float64) *Complex

func (*Complex) Abs

func (z *Complex) Abs() *big.Float

func (*Complex) Add

func (z *Complex) Add(x, y *Complex) *Complex

func (*Complex) Conj

func (z *Complex) Conj(x *Complex) *Complex

func (*Complex) Mul

func (z *Complex) Mul(x, y *Complex) *Complex

func (*Complex) Quo

func (z *Complex) Quo(x, y *Complex) *Complex

func (*Complex) String

func (z *Complex) String() string

func (*Complex) Sub

func (z *Complex) Sub(x, y *Complex) *Complex

type Palette

type Palette interface {
	// contains filtered or unexported methods
}

type Params

type Params struct {
	X          *big.Float
	Y          *big.Float
	XRange     *big.Float
	YRange     *big.Float
	Width      int
	Height     int
	Iterations int
	Threads    int
	Escape     *big.Float
	Grain      int
}

type Rainbow

type Rainbow struct {
	NumColors int
}

type Result

type Result struct {
	Data       [][]int
	Width      int
	Height     int
	Iterations int
}

func GenerateResult

func GenerateResult(prm Params) *Result

Jump to

Keyboard shortcuts

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