gofr

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "0.2.2"

Variables

View Source
var (
	Accent  = color.NRGBA64{0, 0xa000, 0xc000, 0xffff}
	White   = color.NRGBA64{0xffff, 0xffff, 0xffff, 0xffff}
	Black   = color.NRGBA64{0, 0, 0, 0xffff}
	Red     = color.NRGBA64{0xffff, 0, 0, 0xffff}
	Yellow  = color.NRGBA64{0xffff, 0xffff, 0, 0xffff}
	Green   = color.NRGBA64{0, 0xffff, 0, 0xffff}
	Cyan    = color.NRGBA64{0, 0xffff, 0xffff, 0xffff}
	Blue    = color.NRGBA64{0, 0, 0xffff, 0xffff}
	Magenta = color.NRGBA64{0xffff, 0, 0xffff, 0xffff}
)

Functions

func ColorBands

func ColorBands(c *Context, z complex128, x, y, i, max_i int)

func ColorCheck

func ColorCheck(c *Context, z complex128, x, y, i, max_i int)

func ColorExperiment1

func ColorExperiment1(ctx *Context, z complex128, x, y, i, max_i int)

func ColorFire

func ColorFire(ctx *Context, z complex128, x, y, i, max_i int)

func ColorIce

func ColorIce(ctx *Context, z complex128, x, y, i, max_i int)

func ColorMono

func ColorMono(c *Context, z complex128, x, y, i, max_i int)

func ColorMonoStripe

func ColorMonoStripe(c *Context, z complex128, x, y, i, max_i int)

func ColorParti

func ColorParti(c *Context, z complex128, x, y, i, max_i int)

func ColorSmooth

func ColorSmooth(c *Context, z complex128, x, y, i, max_i int)

func ColorSoftSpectrum

func ColorSoftSpectrum(ctx *Context, z complex128, x, y, i, max_i int)

func ColorSuperParti

func ColorSuperParti(c *Context, z complex128, x, y, i, max_i int)

func ColorUnicornRainbow

func ColorUnicornRainbow(ctx *Context, z complex128, x, y, i, max_i int)

func DrawAxesColor

func DrawAxesColor(c *Context, k color.NRGBA64)

func DrawAxesInv

func DrawAxesInv(c *Context)

func DrawTicksColor

func DrawTicksColor(c *Context, tl int, unit float64, k color.NRGBA64)

func DrawTicksInv

func DrawTicksInv(c *Context, tl int, unit float64)

func EBrotEscape added in v0.2.2

func EBrotEscape(c *Context, z complex128, max_i int) (int, complex128)

func Ebrot added in v0.2.2

func Ebrot(c *Context, cancel chan bool) int

func Escape

func Escape(c *Context, z complex128, max_i int) (int, complex128)

func Experimental added in v0.2.2

func Experimental(c *Context, cancel chan bool) int

func ExperimentalEscape added in v0.2.2

func ExperimentalEscape(c *Context, z complex128, max_i int) (int, complex128)

func Fill

func Fill(c *Context, k color.NRGBA64)

func HclaToNRGBA64

func HclaToNRGBA64(h, c, l, a float64) color.NRGBA64

func Mandelbrot

func Mandelbrot(c *Context, cancel chan bool) int

func MemberColorFromString

func MemberColorFromString(hex string) (color.NRGBA64, error)

func PrintByteSize

func PrintByteSize(s uint64) string

func Render

func Render(threads int, contexts []*Context, cancel chan bool) error

func Round added in v0.2.2

func Round(x, unit float64) float64

func TestBlocks

func TestBlocks(c *Context) int

Types

type ColorFunc

type ColorFunc func(*Context, complex128, int, int, int, int)

func ColorFuncFromString

func ColorFuncFromString(name string) (ColorFunc, error)

type Context

type Context struct {
	Cancel       chan bool
	RenderFunc   RenderFunc
	ColorFunc    ColorFunc
	EscapeRadius float64
	Id           int
	Image        *image.NRGBA64
	ImageHeight  int
	ImageWidth   int
	Max          complex128
	MaxI         int
	MemberColor  color.NRGBA64
	Min          complex128
	Scaling      int
	Power        int
}

* Context for rendering images in parallel - a basic description of * work for a render job to be run in one thread.

func MakeContexts

func MakeContexts(im *image.NRGBA64, n int, p *Parameters) (c []*Context)

func (*Context) Delta added in v0.2.2

func (self *Context) Delta() (dx, dy float64)

func (*Context) EachPoint

func (self *Context) EachPoint(fn ContextFunc, cancel chan bool)

* Iterate over the map of pixel coordinates and complex points.

type ContextFunc

type ContextFunc func(int, int, complex128)

* Use this with EachPoint to iterate over the map of pixel coordinates * and mapped complex points.

type Parameters

type Parameters struct {
	RenderFunc   string
	ColorFunc    string
	EscapeRadius float64
	Width        uint
	Height       uint
	ImageHeight  int
	ImageWidth   int
	Max          complex128
	MaxI         int
	MemberColor  string
	Min          complex128
	Scaling      int
	Power        int
}

* Easily serializeable parameters for rendering images.

type RenderFunc

type RenderFunc func(*Context, chan bool) int

func RenderFuncFromString

func RenderFuncFromString(name string) (RenderFunc, error)

Jump to

Keyboard shortcuts

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