fractal

package
v0.0.0-...-eef2c56 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Copyright 2012 Google Inc. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsLessThan

func AbsLessThan(z complex128, l float64) bool

Performs |z| < l without the expensive sqrt

func Do

func Do(f func(name string, newFunc FractalNew))

func HSVToRGBA

func HSVToRGBA(h, s, v float64) color.RGBA

func Register

func Register(name string, newFunc FractalNew)

Types

type DefaultNavigator

type DefaultNavigator struct {
	// contains filtered or unexported fields
}

func NewDefaultNavigator

func NewDefaultNavigator(z uint, xoff, yoff int) DefaultNavigator

func (*DefaultNavigator) GetTranslate

func (n *DefaultNavigator) GetTranslate() image.Point

func (*DefaultNavigator) GetZoom

func (n *DefaultNavigator) GetZoom() uint

func (*DefaultNavigator) Transform

func (n *DefaultNavigator) Transform(p image.Point) (float64, float64)

func (*DefaultNavigator) Translate

func (n *DefaultNavigator) Translate(offset image.Point)

func (*DefaultNavigator) Zoom

func (n *DefaultNavigator) Zoom(z uint)

type Fractal

type Fractal interface {
	image.Image
}

type FractalNew

type FractalNew func(o Options) (Fractal, error)
type Navigator interface {
	// Convert pixel space to fractal space
	Transform(p image.Point) (float64, float64)
	// Set offset in pixel space
	Translate(offset image.Point)
	// Set the zoom depth for this transformation
	Zoom(z int)
}

type Options

type Options struct {
	url.Values
}

func NewOptions

func NewOptions() Options

func (Options) GetFloat64Default

func (o Options) GetFloat64Default(k string, d float64) float64

func (Options) GetIntDefault

func (o Options) GetIntDefault(k string, d int) int

Converts value with key 'k' to int, in absence or failure 'd' is returned

Directories

Path Synopsis
TODO REPLACEME: This package implements an example fractal.
TODO REPLACEME: This package implements an example fractal.
Implementes Perlin noise, see: http://freespace.virgin.net/hugo.elias/models/m_perlin.htm
Implementes Perlin noise, see: http://freespace.virgin.net/hugo.elias/models/m_perlin.htm

Jump to

Keyboard shortcuts

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