flame

package module
v0.0.0-...-9d1239d Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2013 License: Apache-2.0 Imports: 13 Imported by: 0

README

goflam3

I've got this running on heroku here, so you can play around with the web interface.

Usage:

goflam3 serve serve the webapp. That's what you see on heroku goflam3 render render an image. Hit goflame3 render -h for more information.

Background

Flame fractals in golang

Basing my work off of the following texts:

Roadmap

  • Add colorization, color palettes
  • Add more functions
  • Indicate progress
  • Perhaps jump to importing .flam3 files? Then it would be interesting to benchmark against flam3-render
  • Use a pool of goroutines to make awesome faster
  • enableable log equalization
  • enableable gamma equalization

Documentation

Index

Constants

View Source
const LOG = false

Variables

This section is empty.

Functions

func DefaultParams

func DefaultParams() (float64, float64, float64, float64, float64, float64)

func Flame

func Flame(config Config) (*image.RGBA, error)

Flame generates the Fractal image

func FromConfigFile

func FromConfigFile(fname string) (*image.RGBA, error)

func PreviewAll

func PreviewAll(width, height, xs, ys, cols int) *image.RGBA

func ReadConfig

func ReadConfig(fname string, config *Config) (err error)

func RenderPreview

func RenderPreview(width, height, xs, ys int, fn Variation) *image.RGBA

Types

type Config

type Config struct {
	Dims        Dims
	Iterations  int
	Functions   []FunConfig
	DataIn      string
	DataOut     string
	NoImage     bool
	LogEqualize bool
}

Config holds all of the parameters necessary to generate a flame

type Dims

type Dims struct {
	Width  int
	Height int
	X      float64
	Y      float64
	Xscale float64
	Yscale float64
}

type FullVar

type FullVar struct {
	Fn   Variation
	Text string
}

func AllVariations

func AllVariations() []FullVar

type FunConfig

type FunConfig struct {
	Num int
}

FunConfig contains configuration for the various functions to be used in generating a flame

type Pixel

type Pixel struct {
	Alpha int64
	Funcs [20]int64
}

Holds information about a pixel; how many times it was hit, and by which functions. We could actually probably drop the alpha...

type Point

type Point struct {
	X, Y float64
}

Jump to

Keyboard shortcuts

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