Loading

Parametric Snowflake Generator

by gringer, published

Parametric Snowflake Generator by gringer Dec 30, 2012

Description

A computer model of a randomly-generated origami snowflake that should be similar to Wilson Bentley's observations.

Recent Comments

view all

Thanks, I recall that I noticed this when testing it out, but forgot to update my comments (now done).

@gringer,

Very neat and timely utility. I'm going to play with this a bit and see if I can find some nice dxf's that will cut well on my laser for acrylic and wood ornaments.

Your Linux script is slightly off in that you use an 'i' to iterate over a range of numbers, but an 'x' for the file name iterator.

Using the below line, I was generating around 33 dxf files per minute on my stock i5-3570K computer running OpenSCAD 2013.02.28 on Ubuntu 12.04.

for i in $(seq 1 200); do openscad snowflake.scad -D rs=${i} -o flake_${i}.dxf; done

Timing depends on the flake that is generated, but you should see something like a 10x speed increase. OpenSCAD has trouble merging the shapes in 3D, but seems to manage fine in 2D.

More from 2D Art

view more

Makes

Liked By

view all

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag. Print Thing Tag

Instructions

Load up the OpenSCAD file (snowflake.scad), compile and render. If you don't like the look of the snowflake, recompile and try again. When you see something you like, look at the beginning of the compile output and it will have a seed number. Set this as the variable 'rs'.

Consider using openscad to generate files, rather than the pre-generated STL files, because it will make your snowflakes a bit more unique:

openscad snowflake.scad -o random_flake.stl

Snowflakes will be randomly generated based on a few customisable parameters. For a less dense snowflake (more skeletal), reduce the number of crystals (nc). For a more dense snowflake (more like a hexagon), increase the number of crystals. For more variation in crystals, increase the crystal max thickness (cmt). Other parameters are present, see the top of the file for more details.

I have tried to keep the placement of crystal seed start points fairly uniform across the flake (square root function to account for variable area across a triangle), and crystal angles are limited to 60 degrees (as seems to be the case from Wilson Bentley's pictures).

Additional notes:

* Due to the nature of the generator, there may be a few floaters that are not attached to the backbone, so be prepared for a bit of post-print cleaning. The file 'random_flakes_1-16.stl' has been loaded up and cleaned in reptier host by removing these floaters.
* The flake generator is 2D only, but could be easily extended to a 3D version.
* inspiration: marthastewart.com/276331/how-to-make-paper-snowflakes and en.wikipedia.org/wiki/Wilson_Bentley

Snowflake photography is getting more popular:

chaoticmind75.blogspot.ru/2013/08/my-technique-for-snowflakes-shooting.html

File Name

Downloads

Size

Comments

You must be logged in to post a comment.

gringer on Nov 24, 2013 said:

I've updated the generating script to make random snowflakes by default and print out the seed value. You can do the usual openscad
export:

openscad snowflake.scad -o random_flake.stl

or set rs for a specific flake:

openscad snowflake.scad -D rs=5984 -o flake_5984.stl

Of course, the generator can also be wrapped in a loop on a Linux command line to create multiple flakes:

for i in $(seq 1 200); do openscad snowflake.scad -D rs=${x} -o flake_${x}.stl; done

roy_okc on Nov 29, 2013 said:

@gringer,

Very neat and timely utility. I'm going to play with this a bit and see if I can find some nice dxf's that will cut well on my laser for acrylic and wood ornaments.

Your Linux script is slightly off in that you use an 'i' to iterate over a range of numbers, but an 'x' for the file name iterator.

Using the below line, I was generating around 33 dxf files per minute on my stock i5-3570K computer running OpenSCAD 2013.02.28 on Ubuntu 12.04.

for i in $(seq 1 200); do openscad snowflake.scad -D rs=${i} -o flake_${i}.dxf; done

usedbytes on Nov 24, 2013 said:

Sounds awesome. I've got a very dead PC at the moment but I'll try it out when I get back up and running. You expect a big speed increase? With the code I used yesterday, generating 1 flake took 1m32, 2 flakes took 3m (so linear)... but 8 flakes took 54m!

Top