mcalc

package
v0.0.0-...-fb8ea76 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMandelRGBA

func CreateMandelRGBA(params *MandelPictureParameters) *image.RGBA

CreateMandelRGBA creates RGBA image of a piece of the Mandelbrot set

Types

type MandelIterationResult

type MandelIterationResult struct {
	Z         float64
	Iteration int
}

MandelIterationResult describes result for calculations for point

func (*MandelIterationResult) IsBlack

func (r *MandelIterationResult) IsBlack(settings *MandelSettings) bool

IsBlack ckeck point is included in the Mandelbrot set

type MandelPictureParameters

type MandelPictureParameters struct {
	Settings   *MandelSettings
	Z0         complex128
	RealWidth  float64
	X, Y       float64
	CreateRGBA func(result []MandelIterationResult, settings *MandelSettings) *image.RGBA
}

MandelPictureParameters describes parameters for calculation of Masdelbrot set

type MandelSetParameters

type MandelSetParameters struct {
	Settings        *MandelSettings
	SetCount        int
	GetInitialValue func(n int) complex128
	GetRealWidth    func(n int) float64
	GetCoordinates  func(c int) (float64, float64)
	CreateRGBA      func(result []MandelIterationResult, settings *MandelSettings) *image.RGBA
}

MandelSetParameters describes parameters for task which creates set of Masdelbrot set images

type MandelSettings

type MandelSettings struct {
	Width          int
	Height         int
	IterationCount int
}

MandelSettings describes parameters for task which are constant

Jump to

Keyboard shortcuts

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