Copyright | (c) Claude Heiland-Allen 2011 |
---|---|
License | GPL-2 |
Maintainer | claude@mathr.co.uk |
Stability | unstable |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
Support library for rendering animations of the Mandelbrot Set fractal using the gruff executable.
An example program might have a structure similar to:
import Fractal.GRUFF animation :: Animation animation = ... main :: IO () main = defaultMain animation
with its output fed to the gruff executable.
See also:
- the
ruff
package for feature location algorithms; and - the
gruff-examples
package for concrete examples.
- type Animation = [(Image, FilePath)]
- data Image = Image {
- imageWindow :: !Window
- imageViewport :: !Viewport
- imageLocation :: !Location
- imageColours :: !Colours
- imageLabels :: [Label]
- imageLines :: [Line]
- data Window = Window {}
- data Viewport = Viewport {}
- data Location = Location {}
- data Colours = Colours {
- colourInterior :: !Colour
- colourBoundary :: !Colour
- colourExterior :: !Colour
- data Colour = Colour !Double !Double !Double
- data Label = Label {
- labelCoords :: !(Complex Rational)
- labelColour :: !Colour
- labelText :: String
- labelAppend :: Complex Rational -> Colour -> String -> Image -> Image
- labelPrepend :: Complex Rational -> Colour -> String -> Image -> Image
- data Line = Line {
- lineSegments :: [(Complex Rational, Complex Rational)]
- lineColour :: !Colour
- fromScreenCoords :: (Fractional r, Real r) => Window -> Viewport -> Location -> Complex Double -> Complex r
- toScreenCoords :: Real r => Window -> Viewport -> Location -> Complex r -> Complex Double
- defaultMain :: Animation -> IO ()
Documentation
Image specification.
Image | |
|
Window specification.
Viewport specification
Location specification (center of view).
Colour specification.
Colours | |
|
RGB colour data (each channel between 0 and 1).
Labels can be added to points in the complex plane.
Label | |
|
labelAppend :: Complex Rational -> Colour -> String -> Image -> Image Source #
Append a label to an image.
labelPrepend :: Complex Rational -> Colour -> String -> Image -> Image Source #
Prepend a label to an image.
Line | |
|
fromScreenCoords :: (Fractional r, Real r) => Window -> Viewport -> Location -> Complex Double -> Complex r Source #
Transform a point from screen coordinates.
toScreenCoords :: Real r => Window -> Viewport -> Location -> Complex r -> Complex Double Source #
Transform a point to screen coordinates.
defaultMain :: Animation -> IO () Source #
Serialize an animation to stdout.