Also see https://github.com/robertbrignull/Snowflake-c for another implementation of this same problem.
Generates snowflakes by simulating random walks of individual particles.
To compile, run
cargo build --release
To generate a snowflake, run
cargo run --release generate --flake-file output.flake --num-particles <NUM>
This will generate a flake to output.flake
. This file can then later be rendered to produce an image, movie, or other statistics.
You can also continue an existing flake by settings the --flake-file
argument to an existing flake file.
To see all arguments, run
cargo run --release generate --help
To render a snowflake as an image, run
cargo run --release render --flake-file output.flake --output output.png
This will render the flake as a png image.
To see all arguments, run
cargo run --release render --help
To run all fast unit tests, run
cargo test --release
To run performance tests, run
cargo test --release perf -- --ignored --show-output