Module barnsley::transform

source ·
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.

  1. Create a struct to store the transforms parameters. It should have a base_color and weight too.
  2. Derive Serialize, Deserialize, Copy, Clone, Debug for the new transform struct.
  3. Implement the transform trait for that struct.
  4. Add the transform to the Transform enum.

Structs

Enums

Traits

Functions