image

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package image provides image rendering for the Mandelbrot set.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MaxIter

func MaxIter(scale float64) int

MaxIter returns the maximum iteration required for the given scale.

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.

func Scale

func Scale(size image.Point) float64

Scale returns the required scale for the given image size.

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

func BWColorizer(invert bool) Colorizer

BWColorizer returns a Colorizer that uses a black and white color scheme.

func BoundColorizer

func BoundColorizer(bounded, unbounded Colorizer) Colorizer

BoundColorizer returns a Colorizer that uses a bounded color for bounded points and an unbounded color for unbounded points.

func ColorColorizer

func ColorColorizer(col color.Color) Colorizer

ColorColorizer returns a Colorizer that always returns the same color.

func ColorsIterColorizer

func ColorsIterColorizer(cols []color.Color, shift int) Colorizer

ColorsIterColorizer returns a Colorizer that uses a list of colors.

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.

Directories

Path Synopsis
colorizer
rainbow
Package rainbow provides a colorizer that uses a rainbow color scheme.
Package rainbow provides a colorizer that uses a rainbow color scheme.

Jump to

Keyboard shortcuts

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