Procedural Drawing Example in Javascript