Documentation
¶
Overview ¶
Package image provides image rendering for the Mandelbrot set.
Index ¶
- func MaxIter(scale float64) int
- func Render(im draw.Image, tsf Transformation, f mandelbrot.Func, clr Colorizer)
- func RenderParallel(im draw.Image, tsf Transformation, f mandelbrot.Func, clr Colorizer)
- func Scale(size image.Point) float64
- type Colorizer
- type Transformation
- func BaseTransformation(im image.Image, rotate, scale float64, translate complex128) Transformation
- func ImageTransformation(im image.Image) Transformation
- func RotateTransformation(rotate float64) Transformation
- func ScaleTransformation(scale float64) Transformation
- func TranslateTransformation(translate complex128) Transformation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Render ¶
func Render(im draw.Image, tsf Transformation, f mandelbrot.Func, clr Colorizer)
Render renders to an image.
func RenderParallel ¶
func RenderParallel(im draw.Image, tsf Transformation, f mandelbrot.Func, clr Colorizer)
RenderParallel renders to an image in parallel.
Types ¶
type Colorizer ¶
type Colorizer func(complex128, mandelbrot.Result) color.Color
Colorizer is a function that returns a color for a point and a result.
func BWColorizer ¶
BWColorizer returns a Colorizer that uses a black and white color scheme.
func BoundColorizer ¶
BoundColorizer returns a Colorizer that uses a bounded color for bounded points and an unbounded color for unbounded points.
func ColorColorizer ¶
ColorColorizer returns a Colorizer that always returns the same color.
type Transformation ¶
type Transformation func(complex128) complex128
Transformation is a transformation function.
func BaseTransformation ¶
func BaseTransformation(im image.Image, rotate, scale float64, translate complex128) Transformation
BaseTransformation returns a Transformation function for the given parameters.
func ImageTransformation ¶
func ImageTransformation(im image.Image) Transformation
ImageTransformation returns a Transformation function for the given image.
func RotateTransformation ¶
func RotateTransformation(rotate float64) Transformation
RotateTransformation returns a Transformation function for the given rotation.
func ScaleTransformation ¶
func ScaleTransformation(scale float64) Transformation
ScaleTransformation returns a Transformation function for the given scale.
func TranslateTransformation ¶
func TranslateTransformation(translate complex128) Transformation
TranslateTransformation returns a Transformation function for the given translation.