Skip to content

necocen/snowflake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snowflake Simulator

Demo


Overview

This is a program that simulates the growth of snow crystals. It is written in Rust and operates in a multi-threaded environment. Bevy is used for visualization.

The simulation algorithm implements the one described in reference [1]. While parameters can be dynamically changed during execution, ρ (water vapor density) is only reflected upon reset.

By toggling the comments on L.19 and L.20 in main.rs, you can switch to an implementation using the method from reference [2]. In this case, β (water vapor density) is also only reflected upon reset.

As it's built with Rust and Bevy, it should theoretically be possible to make it run in a web browser with some effort. However, since it uses rayon support for ndarray, that part would need to be modified.

Usage

cargo run --release

You can export STL file by pressing "Save STL" button on the control panel. The exported file will be placed in your working directory.

STL

References

  1. Gravner, J., Griffeath, D. (2008). Modeling snow crystal growth II: A mesoscopic lattice map with plausible dynamics. Physica D: Nonlinear Phenomena, 237(3), 385-404.
  2. Reiter, C. A. (2005). A local cellular model for snow crystal growth. Chaos, Solitons & Fractals, 23(4), 1111-1119.

About

Snowflake simulator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages