transformations

package
v0.0.0-...-abc17c1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandomColor

func RandomColor() color.Color

Types

type BubbleTransformation

type BubbleTransformation struct {
	Colorize
}

func NewBubbleTransformation

func NewBubbleTransformation(colorVal color.Color) *BubbleTransformation

func (*BubbleTransformation) Apply

type Colorize

type Colorize struct {
	ColorVal color.Color
}

func (*Colorize) Color

func (c *Colorize) Color() color.Color

type PolarTransformation

type PolarTransformation struct {
	Colorize
}

func NewPolarTransformation

func NewPolarTransformation(colorVal color.Color) *PolarTransformation

func (*PolarTransformation) Apply

type SinusoidalTransformation

type SinusoidalTransformation struct {
	Colorize
}

func NewSinusoidalTransformation

func NewSinusoidalTransformation(colorVal color.Color) *SinusoidalTransformation

func (*SinusoidalTransformation) Apply

type SphericalTransformation

type SphericalTransformation struct {
	Colorize
}

func NewSphericalTransformation

func NewSphericalTransformation(colorVal color.Color) *SphericalTransformation

func (*SphericalTransformation) Apply

type TransformationFactory

type TransformationFactory struct {
	TransformFn TransformationType
	ColorFunc   func() color.Color
}

func NewTransformationFactory

func NewTransformationFactory(transformFn TransformationType, colorFunc func() color.Color) (*TransformationFactory, error)

func (*TransformationFactory) CreateTransformation

func (tf *TransformationFactory) CreateTransformation() fractal.Transformation

type TransformationType

type TransformationType string
const (
	Bubble     TransformationType = "bubble"
	Sinusoidal TransformationType = "sinusoidal"
	Spherical  TransformationType = "spherical"
	Polar      TransformationType = "polar"
	Waves      TransformationType = "waves"
)

type WavesTransformation

type WavesTransformation struct {
	Colorize
	FreqX float64
	FreqY float64
	AmpX  float64
	AmpY  float64
}

func NewWavesTransformation

func NewWavesTransformation(colorVal color.Color, freqX, freqY, ampX, ampY float64) *WavesTransformation

func (*WavesTransformation) Apply

Jump to

Keyboard shortcuts

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