Moving Mandala

Nature of Code / Week 2 / Forces and Vectors

What is a Mandala?
A mandala is a spiritual symbol in Hinduism and Buddhism that was used to represent the universe or the cosmos. It has gradually been adapted as a form of designing structures and psychedelics. The pattern can be found in various places ranging from rangoli designs and album covers to internet art and even hypnosis videos (haha).

Design and Process
Moving Mandala is a simple sketch drawn using the Mover and Attractor classes created by Daniel Shiffman. In fact, the sketch has been drawn on top of Shiffman’s example on the basic attractor.

The whole idea was conceived while I was playing around with the sketch, and trying to develop it into a mandala. I created two partitions and two Mover objects that simultaneously move and constantly change the mandala as they go. The transformations occur as illustrated in the overhead gif.

Never having been in the position of creating generative art (but always having wanted to do so), I was struggling to come up with ideas to begin with. I started tweaking with Shiffman’s sketches and soon realized how the force of attraction can be used to generate mandalas. More so, transforming mandalas. I guess force of attraction is not solely applicable to love and magnets (haha?). The results of this small experiment were definitely amusing, and have given me a lot of leads to work with going forth:

– Modulating alpha values (perhaps, using Gaussian distribution) and looking at the results
– Using more partitions and different patterns
– Changing the acceleration in a controlled manner to produce variant mandalas
– Defining forces between the two objects, along with the force between the objects and the center

Source Code

The associated pde files can be found on Nature of Code’s drive.

Leave a Reply

Your email address will not be published. Required fields are marked *