Included Examples#
These examples are included with the library in /examples
Fourier Series#
Create a complex Fourier Series to draw a target_shape
which returns the shape when queried from 0 to 1
Flow Field Noise#
Move particles around by placing them on a grid of forces (a Flow Field)
Hilbert Curve#
Interpolate between different order Hilbert Curves
Highlights: interp
, lerp
, ease
, seamless looping
Mandelbrot#
Render a Mandelbrot Set
Highlights: panning, zooming, drawing to pixels
Gas Maxwell Boltzmann Distribution#
The speeds of particles of a gas approach a Maxwell Boltzmann Distribution
Highlights: particle simulation, plotting a graph
Poisson Disk Sampling#
Distribute points evenly in a plane
Highlights: random::poisson_disc_points
Prime Spiral#
Numbers make spirals when plotted in polar coordinates
Inspired by https://youtu.be/EK32jo7i5LQ
Hightlights: Vector2::from_polar
, panning, zooming
Second Order Dynamics#
Use the SecondOrderDynamics
struct to make a point follow the cursor.
Softbody#
Full-fledged softbody simulation using damped springs
Highlights: Grid
, Spring