Loading

Parametric Snowflake Generator

by gringer, published

Parametric Snowflake Generator by gringer Dec 30, 2012
4 Share
Download This Thing! Customize Order This Printed Tools & Utilities

Thing Info

9774Views 7057Downloads Found in 2D Art
Report Thing

Summary

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

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:

More from 2D Art

view more

Thing Info

9774Views 7057Downloads Found in 2D Art
Report Thing

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

File Name

Downloads

Size

All Apps

This App connects Thingiverse with Makeprintable, a cloud-based mesh repair service that analyzes, validates and repairs most common mesh errors that can occur when preparing a 3D design file for p...

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

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
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

@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

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.

Top