pub trait FractalDescriptor {
// Required methods
fn config(&self) -> &FractalConfig;
fn center(&self) -> Complex;
fn render_pixel(
&self,
z_init: Complex,
scale: f64,
max_radius: f64,
) -> (ColorRGB, f64, f64);
fn info_text(&self) -> String;
// Provided method
fn is_julia(&self) -> bool { ... }
}Expand description
A polymorphic trait that defines the core algebraic structure for any procedural fractal.
Implementing this trait automatically provides an optimised ImageEffect implementation
via the blanket impl below, keeping the rendering engine fully decoupled from the
specific mathematics of each generator.
Required Methods§
Sourcefn config(&self) -> &FractalConfig
fn config(&self) -> &FractalConfig
Retrieves the shared viewport layout configuration.
Sourcefn center(&self) -> Complex
fn center(&self) -> Complex
Focus centre point on the complex plane.
For Julia-family fractals the centre is the constant c; for Mandelbrot-family
fractals it is the viewport centre used by Viewport.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".