TMA Engine: Affine Transformation Toolkit
A lightweight and ergonomic Rust crate for defining, composing, and applying 2D affine transformations.
TMA stands for Transformation, Matrix, Affine. This engine provides the core algebraic structures for working with Iterated Function Systems (IFS), which are the mathematical foundation for generating a wide variety of fractals, including the Sierpinski Gasket and Barnsley's Fern.
Features
- Clear Algebraic Structure: The
TMAstruct cleanly represents the transformationT(v) = A*v + c. - Operator Overloading: Use the
*operator to naturally compose transformations (TMA * TMA) or apply them to points (TMA * Point). - Stochastic IFS Support: Includes an optional
probabilityfield in theTMAstruct, essential for algorithms like the Chaos Game. - Helper Constructors: Provides convenient methods for creating common transformations like scaling, rotation, and translation.
Usage
Add this crate to your Cargo.toml:
[]
= "0.1.8" # Or the latest version
Example
use ;
Purpose
This crate is a foundational component of the FractalAlgebra workspace. It provides the geometric building blocks for generating and exploring fractals and other systems based on affine transformations
Author
Neil Crago — experimental mathematician
Related Crates
This crate is part of a collection of crates by the same author: These include:-
- MOMA
- MOMA_simulation_engine
- fractal_algebra
- factorial_engine
- fa_slow_ai