This is just a bit of code I put together to show a simple algorithm. Remix and play with as you like.