Documentation ¶
Index ¶
- Constants
- Variables
- func MakeDefaultRenderConfigFile(p *RenderConfig) error
- func MakeRegularPoints(n int) []Point2f
- func RandPointInRadius(r *rand.Rand, radius float64) Point2f
- func RegularPoints(n int, radius float64, phase float64) []Point2f
- func Render(rc RenderConfig, nr Nexter) (image.Image, error)
- type CornerpointSelector
- type CorrectFunc
- type Feeder
- type Nexter
- type PsFeeder
- type RenderConfig
Constants ¶
View Source
const DefaultRenderConfigFilename = "render_config.json"
Variables ¶
View Source
var DefaultRenderConfig = RenderConfig{ ImageFilename: "attractor.png", ImageSize: "512x512", TotalPoints: 10_000_000, RadiusFactor: 0.9, FillBG: true, ColorBG: "#fff", ColorFG: "#000", Smooth: true, ToneFactor: 15, }
Functions ¶
func MakeDefaultRenderConfigFile ¶
func MakeDefaultRenderConfigFile(p *RenderConfig) error
func MakeRegularPoints ¶
func MakeRegularPoints(n int) []Point2f
func RandPointInRadius ¶
func RegularPoints ¶
Types ¶
type CornerpointSelector ¶
type CornerpointSelector int
const ( CornerpointRandom CornerpointSelector = iota CornerpointNotTwice CornerpointNotDirectNeighbors )
func ParseCornerpointSelector ¶
func ParseCornerpointSelector(s string) (CornerpointSelector, error)
type CorrectFunc ¶
func GammaCorrectionFunc ¶
func GammaCorrectionFunc(gamma float64) CorrectFunc
type PsFeeder ¶
type PsFeeder struct {
// contains filtered or unexported fields
}
------------------------------------------------------------------------------
func NewPsFeeder ¶
func NewPsFeeder(ps []Point2f, t float64, cps CornerpointSelector) *PsFeeder
type RenderConfig ¶
type RenderConfig struct { ImageFilename string `json:"image_filename"` ImageSize string `json:"image_size"` TotalPoints int `json:"total_points"` RadiusFactor float64 `json:"radius_factor"` FillBG bool `json:"fill_bg"` ColorBG string `json:"color_bg"` ColorFG string `json:"color_fg"` Smooth bool `json:"smooth"` ToneFactor float64 `json:"tone_factor"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.