OpenSCAD and randomness

A quick google search tells me that OpenSCAD doesn’t have a random number generator.  That’s a bit of a bummer.  I was just thinking how cool it would be to have an OpenSCAD file that would give you little variations on itself every time you generated an STL.  I’m thinking snowflakes, giant fingerprints, and other things that have a little bit of chance and chaos built in.

Or, perhaps some kind of Mad Libs-esque system where you tell it to create an alien or monster figure and you get a random number of eyes, heads, noses, arms, legs, and tails.

Now, I figure with CloudSCAD it wouldn’t be terribly difficult to add a little bit of javascript that can include a random number with given parameters…  So, it’s at least possible.

ETA

I’ve been blathering about my MakerBot kit to anyone and everyone who will listen for weeks and months now.  All that is left to do is build it. 1  A friend asked me how long it would take me to build it.

Thinking aloud, I reasoned that if two skilled people could build one MakerBot in a weekend, I might have a shot at building one in about two to three weeks.2

I hope that’s not too optimistic.  :)

I guess that’s what Christmas miracles are for, eh? 3

  1. Oh, that’s all? []
  2. Though a YouTube video suggest two people can build one in a single night. []
  3. Actually, I would love to finish it in time for Christmas so I can print out some snowflakes for the tree, but I just don’t see it in the cards. []