Creating Random Movements

I was wondering if there was a way to make movements confined to a certain order. I saw a DNA effect, and it was quite awesome. If anyone can post the code I’d be more than appreciative.