Documentation
¶
Index ¶
- Variables
- func Degrees(radians float32) float32
- func HexColor(x int) color.RGBA
- func Image(w, h int, grids [][]float32, palette Palette, min, max, gamma float32) image.Image
- func IsPowerOfTwo(x int) bool
- func PrintConfigs(configs []Config, table [][]float32)
- func Radians(degrees float32) float32
- func RandomAttractionTable(n int) [][]float32
- func Run()
- func SavePNG(path string, im image.Image, level png.CompressionLevel) error
- func Shift(x, size float32) float32
- func SummarizeConfigs(configs []Config)
- type Config
- type Grid
- type Model
- type Palette
- type Particle
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func IsPowerOfTwo ¶
func PrintConfigs ¶
func RandomAttractionTable ¶
func SummarizeConfigs ¶
func SummarizeConfigs(configs []Config)
Types ¶
type Config ¶
type Config struct {
SensorAngle float32
SensorDistance float32
RotationAngle float32
StepDistance float32
DepositionAmount float32
DecayFactor float32
}
func RandomConfig ¶
func RandomConfig() Config
func RandomConfigs ¶
type Model ¶
type Model struct {
W int
H int
BlurRadius int
BlurPasses int
ZoomFactor float32
Configs []Config
AttractionTable [][]float32
Grids []*Grid
Particles []Particle
Iteration int
}
type Palette ¶
func BlackPalette ¶
func BlackPalette() Palette
func RandomPalette ¶
func RandomPalette() Palette
func ShuffledPalette ¶
Click to show internal directories.
Click to hide internal directories.