Parametric Snowflake Generator

by gringer, published

Parametric Snowflake Generator by gringer Dec 30, 2012
4 Share
Download All Files

Thing Apps Enabled

Order This Printed View All Apps


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

Thing Statistics

12786Views 9115Downloads Found in 2D Art


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


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:

More from 2D Art

view more

File Name



All Apps

Auto-magically prepare your 3D models for 3D printing. A cloud based 3D models Preparing and Healing solution for 3D Printing, MakePrintable provides features for model repairing, wall thickness...

App Info Launch App

Kiri:Moto is an integrated cloud-based slicer and tool-path generator for 3D Printing, CAM / CNC and Laser cutting. *** 3D printing mode provides model slicing and GCode output using built-in...

App Info Launch App
KiriMoto Thing App

With 3D Slash, you can edit 3d models like a stonecutter. A unique interface: as fun as a building game! The perfect tool for non-designers and children to create in 3D.

App Info Launch App

Print through a distributed network of 3D printing enthusiasts from across the US, at a fraction of the cost of the competitors. We want to change the world for the better through technology, an...

App Info Launch App

Quickly Scale, Mirror or Cut your 3D Models

App Info Launch App

Treatstock is an online platform that offers decentralized manufacturing services such as 3D printing and CNC machining for business-to-business and business-to-consumer sales all over the world. W...

App Info Launch App

3D print your favourite design with NinjaPrototype, a professional 3D manufacture with consistent quality and speed.

App Info Launch App

Is there any way of not generating flakes with floating components ?
IE: a snowflake where everything is connected to everything else ?
Would make it easier for printing.

I have already provided "cleaned" versions for printing. It's easy enough to do manually in Cura or Repetier by breaking the object into parts, moving the largest part, then deleting the remainder.

I've changed the models because too many people were making exactly the same snowflakes. These are meant to be unique, people!

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

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


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

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

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!

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.