IFS-0.1.1: Iterated Function System generation for Haskell

Portability non-portable (multi-parameter type classes) experimental misc@alpheccar.org

Graphics.IFS.Geometry

Description

Description

Some geometry operations used by the IFS

Synopsis

Types

Matrix and Vector

data M a Source

Affine transform on 2x2 space

Instances

 Num a => Module a (M a) Eq a => Eq (M a) Num a => Num (M a) Show a => Show (M a) Num a => Module (M a) (V a) Fractional a => Module (M a) (IFS a) For applying a linear transformation to an IFS

newtype V a Source

Vector

Constructors

 V (a, a)

Instances

 Num a => Module a (V a) Eq a => Eq (V a) Num a => Num (V a) Show a => Show (V a) Num a => Module (NonLinearTransform a) (V a) Num a => Module (M a) (V a)

Non linear transformations

type NonLinear a = V a -> V aSource

A pure non linear transformation

newtype NonLinearTransform a Source

A non linear transformation with a pure non linear part and an affine one

Constructors

 NL (NonLinear a, M a)

Instances

 Num a => Module (NonLinearTransform a) (V a) Num a => Module (NonLinear a) (NonLinearTransform a)

Modules

class Module a b whereSource

Elements which can be transformed by an operator

Methods

(<*>) :: a -> b -> bSource

Instances

 Num a => Module a (M a) Num a => Module a (V a) Num a => Module a (IFS a) For applying a scalar transformation to an IFS Num a => Module (NonLinearTransform a) (V a) Num a => Module (NonLinear a) (NonLinearTransform a) Num a => Module (NonLinear a) (IFS a) For applying a non linear transformation to the IFS Num a => Module (M a) (V a) Fractional a => Module (M a) (IFS a) For applying a linear transformation to an IFS

Creating linear transformations

Arguments

 :: Num a => a a -> a b -> a c -> a d -> a e -> a f -> M a

Create a pure affine transformation Linear part: a b c d Affine part: e f

Linear

Sinusoidal

Spherical

Swirl

Horseshoe

Polar

Handkerchief

Heart

Disc

Spiral

Hyperbolic

Diamond

Ex

Misc

Start vector used to initiate the generation of a random trajectory

inv :: Fractional a => M a -> M aSource

det :: Num a => M a -> aSource