Thanks to visit codestin.com
Credit goes to github.com

Skip to content

martinbarez/snowflake

Repository files navigation

Snowflake Generator

collage

Overview

A cellular automata that generates snow crystals as described in [1].

Written in Python 3, doesn't require external packages.
It produces svg files. An example can be found in media. Other examples have been rasterized.
It is slow; it runs on a single thread and has not been optimized.

Usage

from snowflake import Automata, save_svg

automata = Automata(100)
automata.grow(100)
save_svg(automata, "snowflake.svg")

There are a few examples in examples.py.

References

  1. Gravner, J., Griffeath, D. (2008). Modeling snow crystal growth II: A mesoscopic lattice map with plausible dynamics.

Similar projects

Python 2 : https://github.com/vishnubob/snowflake
Rust, multithreaded: https://github.com/necocen/snowflake
OpenGL fragment shader: https://www.shadertoy.com/view/43tcRN

About

A python3 cellular automata that generates snow crystals

Resources

License

Stars

Watchers

Forks

Languages