Expand description
functions used in the IFS
Adding a new transform
It’s recommended to look at a simple transform’s implementation before adding a new one.
For example, look at LinearTransform to understand what each part does.
- Create a struct to store the transforms parameters. It should have a
base_colorandweighttoo. - Derive
Serialize, Deserialize, Copy, Clone, Debugfor the new transform struct. - Implement the
transformtrait for that struct. - Add the transform to the
Transformenum.
Structs
- LinearTransform defined by the matrix: [a b] [c d]
- An iterator over the variants of Transform
Enums
Traits
- All transforms must have this trait
Functions
- Use to map a point (x,y) to image space.