Blizzard of Unique Snowflakes
Derived from
Description
The code is a bit strange, as OpenSCAD doesn't support recursion, and barely supports arrays. But with persistence I think I've come up with something pretty cool.
I've uploaded 8 ready-to-print snowflakes! And you can generate all you like!
So let's make a million unique snowflakes!
Updated: added bash script to generate a blizzard of snowflakes, and modified script to run with proper randomness.
Updated: created thingiverse.com/thing:40959 which is Customizable.
Instructions
To generate unique snowflakes, load the script into OpenSCAD. Every time you change the 'seed' and run it, it will generate a unique 3D snowflake. Export the ones you like as STL files and print them. And upload photo's, so that we can all appreciate a 'blizzard' of unique snowflakes.
Or download the bash file, and generate a 'blizzard' of snowflakes automatically!
You must be logged in to post a comment.
To use recursion in OpenSCAD, you can try these two workarounds:
Workaround in C: OpenCSCAD
http://smcameron.github.com/op...
Workaround in Python:
PyOpenSCAD http://www.thingiverse.com/thi...
PyOpenSCAD is tempting. I've used it a little, and it was a bit awkward writing Python to generate SCAD files, then running OpenSCAD to generate STL, then loading STL into ReplicatorG to print. But it just occurred to me that the Python script could render the SCAD file, then run it through OpenSCAD command line, then open it into ReplicatorG, making the whole process painless for users.
Fun!
nice work. I have been generating snowflakes on my Laptop PC. takes about 5 minutes each. I just have it running in the background.
I'd say 2-3 out of 10 nice, and 1 of ten are really outstanding...
Whipped up a little bash script that generates a blizzard of snowflakes. It runs on a command line (e.g. "bash blizzard"). Which is fun to type even aside from scripting generation of zillions of snowflakes.
blizzard:#!/bin/bashfor i in `seq 1 1000`;do /Applications/OpenSCAD.app/Contents/MacOS/OpenSCAD -o snowflake-$i.stl ~/Desktop/snowflake.scaddone
The script can generate some rather complex shapes. It's pretty amusing to me how 3K of OpenSCAD code can generate 2 MB STL files. Still, it shouldn't "kill" OpenSCAD, just make it work hard. I've run the script on both a Windows PC and a Mac, and it ran, though it did take a few minutes to compile the geometry, during which time OpenSCAD consumed 98% of my computer's CPU. I'd suggest letting it run for 5 minutes to see if it comes back.
But I'll generate a few more snowflakes to see what happens.
your script kills my openscad... dont know why.
i have to take some of your stl
License

Featured? Cool!