click to enlarge the image
1
2
3
4

Random Wires: I write a python script in Maya to generate random wire sculpture. Each curve is drawn from a locator position, and then a tube is drawn along the curve. The direction a wire takes is one of six directions: up, down, left, right, forward, back. However, a wire cannot go where it has been before, or where another wire is. Download to view complete script: RandomWires.py

I wanted to simulate the bending of wires, and to do so I couldnt let the wires intersect themselves. So rather than just selecting a random number for the position, I used a recursive technique, and made sure that the direction a wire was going in would not be where it had just come from.
Once a wire is determined to be free to travel onward, the new position is stored in a searchable list to avoid doubling up of positions between wires.