Portability | non-portable (multi-parameter type classes) |
---|---|
Stability | experimental |
Maintainer | misc@alpheccar.org |
Description
Some geometry operations used by the IFS
- data M a
- newtype V a = V (a, a)
- type NonLinear a = V a -> V a
- newtype NonLinearTransform a = NL (NonLinear a, M a)
- class Module a b where
- (<*>) :: a -> b -> b
- linear :: Num a => a -> a -> a -> a -> a -> a -> M a
- rotation :: Double -> M Double
- scaling :: Double -> Double -> M Double
- translation :: Double -> Double -> M Double
- v0 :: NonLinear Double
- v1 :: NonLinear Double
- v2 :: NonLinear Double
- v3 :: NonLinear Double
- v4 :: NonLinear Double
- v5 :: NonLinear Double
- v6 :: NonLinear Double
- v7 :: NonLinear Double
- v8 :: NonLinear Double
- v9 :: NonLinear Double
- v10 :: NonLinear Double
- v11 :: NonLinear Double
- v12 :: NonLinear Double
- startVector :: V Double
- inv :: Fractional a => M a -> M a
- det :: Num a => M a -> a
Types
Matrix and Vector
Affine transform on 2x2 space
Vector
V (a, a) |
Non linear transformations
newtype NonLinearTransform a Source
A non linear transformation with a pure non linear part and an affine one
Num a => Module (NonLinearTransform a) (V a) | |
Num a => Module (NonLinear a) (NonLinearTransform a) |
Modules
Elements which can be transformed by an operator
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
Create a pure affine transformation Linear part: a b c d Affine part: e f
Non linear transformations
Misc
Start vector used to initiate the generation of a random trajectory
inv :: Fractional a => M a -> M aSource