IFS-0.1.1: Iterated Function System generation for Haskell

Portabilityportable
Stabilityexperimental
Maintainermisc@alpheccar.org

Graphics.IFS.Ppm

Contents

Description

Description

Portable Pixel Map

Synopsis

Color formats

data Color Source

RGB Color

Constructors

RGB Word8 Word8 Word8 

Instances

Picture Creation

createPictSource

Arguments

:: String

Name of file

-> Int

Picture width

-> Int

Picture height

-> Int

Nb of pixels to compute

-> ColorizeFunction

How to colorize the result

-> IFS Double

IFS

-> IO ()

Output action

Create a PPM picture.

Some standard colors

red :: ColorSource

Red color

green :: ColorSource

Gree color

blue :: ColorSource

Blue color

white :: ColorSource

white color

black :: ColorSource

Black color

Coloring functions

type ColorizeFunction = Word8 -> [Word8] -> [Word8]Source

The type of a coloring functions. The first argument is an index value and the second argument is a list of RGB value. The function is assumed to concatenate a new triple of RGB value to the list

binaryColorSource

Arguments

:: Color

Background Color for index null

-> Color

Foreground Color for index not null

-> Word8

Index

-> [Word8]

List of RGB values

-> [Word8]

List of RGB values

Binary coloring

densityColorSource

Arguments

:: Int

Scaling factor

-> Color

Background Color for index null

-> Color

Foreground Color for index not null

-> Word8

Index

-> [Word8]

List of RGB values

-> [Word8]

List of RGB values

Density coloring with linear interpolation