-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | fractal explorer GUI using the ruff library
--
-- Mandelbrot Set fractal explorer using the ruff library.
--
-- Requires GTK, OpenGL, and GLSL fragment shader support; lots of RAM
-- and multiple CPU cores recommended.
--
-- If you want to explore very deep zooms, you'll need hmpfr which
-- currently requires GHC to be compiled with integer-simple instead of
-- the default integer-gmp. To install with MPFR support, use cabal
-- install gruff -fmpfr. Note that the default setting for this flag
-- has changed since gruff-0.2.
--
-- gruff-0.4 updates for ghc-8.0.
--
-- gruff-0.3.4 updates dependencies for ghc-7.8. Colouring is improved.
--
-- gruff-0.3.3 relaxes dependencies for ghc-7.6.
--
-- gruff-0.3.1 is a bugfix release, fixing a performance problem wherein
-- offscreen tiles were needlessly calculated. The performance gain is
-- much less (and in many cases is in fact a performance loss) when using
-- integer-simple.
--
-- gruff-0.3 includes a small library to allow external programs to
-- create diagrams and animations with gruff. See the gruff-examples
-- package. The interface has been remodelled to simplify it and add
-- informative feature overlays.
--
-- gruff-0.2.1 was a bugfix release. Changes since gruff-0.2:
--
--
-- - Supersampling bugs are fixed (no more undocumented quantization
-- leading to inconsistent appearance at different zoom levels).
-- - Race condition bugs in cache management are fixed (no more
-- incompletely rendered images).
-- - Internal changes/refactoring to make future additions easier.
--
--
-- Features in this version include:
--
--
-- - Interactive fractal browser display with mouse controls:
-- - Left click to zoom in (press shift for bigger jumps).
-- - Right click to zoom out (press shift for bigger jumps).
-- - Middle click to center.
-- - Shift middle click to auto-focus.
-- - Control left click to label with period.
-- - Control right click to label with angled internal address
-- (slow!).
-- - Session persistance (stored in ~/.gruff/state.gruff -
-- states can also be loaded from and saved to other files, including
-- labels and rays). Note that the file format is incompatible with
-- previous releases of gruff.
-- - Tile cache (by default in ~/.gruff/cache - symlink it
-- somewhere with a few GB of space if you plan on exploring a lot).
-- - Can use MPFR if desired for higher precision, allowing deeper
-- zooms and locating high period nucleii.
-- - Limited amount of customizable colouring (colours for interior,
-- border, and exterior points, as well as labels and rays).
-- - Supersampling for more detailed images (useful range is 1 to
-- 16).
-- - Rudimentary scripting support (see the gruff-examples
-- package).
--
--
-- Future versions will focus on enhancing the scripting support.
@package gruff
@version 0.4
-- | 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.
--
module Fractal.GRUFF
-- | Animation specification
type Animation = [(Image, FilePath)]
-- | Image specification.
data Image
Image :: !Window -> !Viewport -> !Location -> !Colours -> [Label] -> [Line] -> Image
[imageWindow] :: Image -> !Window
[imageViewport] :: Image -> !Viewport
[imageLocation] :: Image -> !Location
[imageColours] :: Image -> !Colours
[imageLabels] :: Image -> [Label]
[imageLines] :: Image -> [Line]
-- | Window specification.
data Window
Window :: !Int -> !Int -> !Double -> Window
[width] :: Window -> !Int
[height] :: Window -> !Int
[supersamples] :: Window -> !Double
-- | Viewport specification
data Viewport
Viewport :: !Double -> !Double -> Viewport
[aspect] :: Viewport -> !Double
[orient] :: Viewport -> !Double
-- | Location specification (center of view).
data Location
Location :: !(Complex Rational) -> !Double -> Location
[center] :: Location -> !(Complex Rational)
[radius] :: Location -> !Double
-- | Colour specification.
data Colours
Colours :: !Colour -> !Colour -> !Colour -> Colours
[colourInterior] :: Colours -> !Colour
[colourBoundary] :: Colours -> !Colour
[colourExterior] :: Colours -> !Colour
-- | RGB colour data (each channel between 0 and 1).
data Colour
Colour :: !Double -> !Double -> !Double -> Colour
-- | Labels can be added to points in the complex plane.
data Label
Label :: !(Complex Rational) -> !Colour -> String -> Label
[labelCoords] :: Label -> !(Complex Rational)
[labelColour] :: Label -> !Colour
[labelText] :: Label -> String
-- | Append a label to an image.
labelAppend :: Complex Rational -> Colour -> String -> Image -> Image
-- | Prepend a label to an image.
labelPrepend :: Complex Rational -> Colour -> String -> Image -> Image
data Line
Line :: [(Complex Rational, Complex Rational)] -> !Colour -> Line
[lineSegments] :: Line -> [(Complex Rational, Complex Rational)]
[lineColour] :: Line -> !Colour
-- | Transform a point from screen coordinates.
fromScreenCoords :: (Fractional r, Real r) => Window -> Viewport -> Location -> Complex Double -> Complex r
-- | Transform a point to screen coordinates.
toScreenCoords :: Real r => Window -> Viewport -> Location -> Complex r -> Complex Double
-- | Serialize an animation to stdout.
defaultMain :: Animation -> IO ()
instance GHC.Classes.Eq Fractal.GRUFF.Image
instance GHC.Show.Show Fractal.GRUFF.Image
instance GHC.Read.Read Fractal.GRUFF.Image
instance GHC.Classes.Eq Fractal.GRUFF.Line
instance GHC.Show.Show Fractal.GRUFF.Line
instance GHC.Read.Read Fractal.GRUFF.Line
instance GHC.Classes.Eq Fractal.GRUFF.Label
instance GHC.Show.Show Fractal.GRUFF.Label
instance GHC.Read.Read Fractal.GRUFF.Label
instance GHC.Classes.Eq Fractal.GRUFF.Colours
instance GHC.Show.Show Fractal.GRUFF.Colours
instance GHC.Read.Read Fractal.GRUFF.Colours
instance GHC.Classes.Eq Fractal.GRUFF.Colour
instance GHC.Show.Show Fractal.GRUFF.Colour
instance GHC.Read.Read Fractal.GRUFF.Colour
instance GHC.Classes.Eq Fractal.GRUFF.Location
instance GHC.Show.Show Fractal.GRUFF.Location
instance GHC.Read.Read Fractal.GRUFF.Location
instance GHC.Classes.Eq Fractal.GRUFF.Viewport
instance GHC.Show.Show Fractal.GRUFF.Viewport
instance GHC.Read.Read Fractal.GRUFF.Viewport
instance GHC.Classes.Eq Fractal.GRUFF.Window
instance GHC.Show.Show Fractal.GRUFF.Window
instance GHC.Read.Read Fractal.GRUFF.Window