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 ¶
View Source
var Palettes = []Palette{ Palette{ HexColor(0xFA2B31), HexColor(0xFFBF1F), HexColor(0xFFF146), HexColor(0xABE319), HexColor(0x00C481), }, Palette{ HexColor(0x004358), HexColor(0x1F8A70), HexColor(0xBEDB39), HexColor(0xFFE11A), HexColor(0xFD7400), }, Palette{ HexColor(0x334D5C), HexColor(0x45B29D), HexColor(0xEFC94C), HexColor(0xE27A3F), HexColor(0xDF5A49), }, Palette{ HexColor(0xFF8000), HexColor(0xFFD933), HexColor(0xCCCC52), HexColor(0x8FB359), HexColor(0x192B33), }, Palette{ HexColor(0x730046), HexColor(0xBFBB11), HexColor(0xFFC200), HexColor(0xE88801), HexColor(0xC93C00), }, Palette{ HexColor(0xE6DD00), HexColor(0x8CB302), HexColor(0x008C74), HexColor(0x004C66), HexColor(0x332B40), }, Palette{ HexColor(0xF15A5A), HexColor(0xF0C419), HexColor(0x4EBA6F), HexColor(0x2D95BF), HexColor(0x955BA5), }, Palette{ HexColor(0xF41C54), HexColor(0xFF9F00), HexColor(0xFBD506), HexColor(0xA8BF12), HexColor(0x00AAB5), }, }
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 }
Click to show internal directories.
Click to hide internal directories.