Skip to content

robertbrignull/Snowflake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Also see https://github.com/robertbrignull/Snowflake-c for another implementation of this same problem.

Snowflake

Generates snowflakes by simulating random walks of individual particles.

Use

Compiling

To compile, run

cargo build --release

Running

Generating a snowflake

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

Rendering a snowflake

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

Running tests

To run all fast unit tests, run

cargo test --release

To run performance tests, run

cargo test --release perf -- --ignored --show-output

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages