Copyright | (c) Claude Heiland-Allen 20112015 |
---|---|
License | BSD3 |
Maintainer | claude@mathr.co.uk |
Stability | unstable |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
Fractal.RUFF.Mandelbrot.Image
Description
Generic (slow) functions to render images.
- simpleImage :: (Ord r, Floating r) => Coordinates r -> Int -> UArray (Int, Int) Bool
- complexImage :: (Ord r, Real r, Floating r) => Coordinates r -> Int -> UArray (Int, Int, Channel) Float
- imageLoop :: (Ord r, Floating r) => STRef s Int -> a -> Int -> Int -> Bool -> Int -> [Iterate u r] -> (Output u r -> ST s ()) -> ST s a
- coordinates :: (Ord r, Floating r) => Int -> Int -> Complex r -> r -> Coordinates r
- ascii :: UArray (Int, Int) Bool -> String
- unicode :: UArray (Int, Int) Bool -> String
- data Channel
- type Coordinates r = (((Int, Int), (Int, Int)), [(Pair Int Int, Complex r)])
- border :: UArray (Int, Int, Channel) Float -> UArray (Int, Int) Bool
Documentation
Arguments
:: (Ord r, Floating r) | |
=> Coordinates r | coordinates |
-> Int | max iterations |
-> UArray (Int, Int) Bool | image |
Render an image with the Simple
algorithm. The iteration count is
doubled until the image is good enough, or the fixed maximum iteration
count is reached.
putStr . unicode $ simpleImage (coordinates 100 100 ((-1.861):+0) (0.001)) 1000000000
Arguments
:: (Ord r, Real r, Floating r) | |
=> Coordinates r | coordinates |
-> Int | max iterations |
-> UArray (Int, Int, Channel) Float | image |
Render an image with the DistanceEstimate
algorithm. The iteration count is
doubled until the image is good enough, or the fixed maximum iteration
count is reached. The output values are converted to Float
.
putStr . unicode . border $ complexImage (coordinates 100 100 ((-1.861):+0) (0.001)) 1000000000
Arguments
:: (Ord r, Floating r) | |
=> STRef s Int | escapees |
-> a | output array |
-> Int | max iterations |
-> Int | iterations |
-> Bool | prior escapees |
-> Int | iterations this phase |
-> [Iterate u r] | iterates |
-> (Output u r -> ST s ()) | output callback |
-> ST s a | output array as given |
Image rendering loop.
Arguments
:: (Ord r, Floating r) | |
=> Int | width |
-> Int | height |
-> Complex r | center |
-> r | size |
-> Coordinates r |
The parameter plane coordinates for an image, with bounds.
Convert a bit array to ascii graphics.
Convert a bit array to unicode block graphics.
Channels in an image.
Constructors
EscapeTime | continuous dwell |
DistanceEstimate' | normalized to pixel spacing |
FinalAngle | in [-pi,pi] |