Code Monkey home page Code Monkey logo

snowfake's Introduction

Snowfake

Copyright ยฉ 2012 Bart Massey

[This is a work-in-progress. It does run (when given one argument describing the size of the snowfake to be built), but I don't think the simulation is quite right yet, and it's incredibly slow. I'll honestly probably not get to it until around next Christmas, though. :-)]

This code generates Gravner-Griffeath "Snowfakes", as described in

Janko Gravner and David Griffeath, "Modeling Snow Crystal Growth II: A mesoscopic lattice map with plausible dynamics", Physica D: Nonlinear Phenomena (237)385โ€“404 2008, URL http://psoup.math.wisc.edu/papers/h2l.pdf accessed 2012/12/17.

Gravner and Griffeath's own C code has been generously made available on their website. However, I found this code fairly incomprehensible and hard to adapt to my purposes.

I am also aware of an open-source Python implementation by Giles Hall and Rachel Holmes, available on Github. However, even though it can use pypy, I am suspicious that I can improve its performance, and also clean up its output routines.

One of the primary purposes of this code base is to use SVG rather than a raster format as the underlying output representation. By rendering SVG hexagons, it is hoped that one can get a bit better view of what's going on.

This work is available under the "MIT License". Please see the file COPYING in this distribution for license terms.

snowfake's People

Contributors

bartmassey avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

snowfake's Issues

Crashes immediately

(gdb) run
Starting program: /home/alexandre/soft/graphics/snowfake/snowfake
snowfake: snowfake.c:271: main: Assertion `argc == 2' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff7755425 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0 0x00007ffff7755425 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffff7758b8b in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007ffff774e0ee in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3 0x00007ffff774e192 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#4 0x0000000000400f77 in main (argc=, argv=) at snowfake.c:271

Ubuntu 12.10, 64bit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.