Week 3 – Generative Art Work

For this assignment, I decided to create a simple demonstration of a mandala. I used only three shapes of small, big circles and rectangles; which rotate around the center, forming a visual pattern.

A mandala is a geometric pattern that holds deep symbolic and spiritual significance in various cultures around the world. It often represents unity, harmony, and the balance of elements. In my work, I tried to capture the essence of a mandala by creating a dynamic composition of shapes that radiate from the center, reminiscent of the sun.

Compared to my previous coding assignments, this time I had fewer issues. However, I found it challenging to implement the rotation drawing for the shapes. I used the “translation” function to establish the center of the screen as the point around which the shapes would rotate. This function moves the rotating point to the desired center position. Next, I computed the angles of rotation using the “map” function, based on each shape’s index within the array of shapes. These angles of rotation were then used in the “rotation” function, for shapes to spin around the central point.

let angle = map(this.index, 0, shapes.length / 3, 0, TWO_PI); // Calculate the angle for rotation
let x = cos(angle) * this.radius;
let y = sin(angle) * this.radius;

push(); 
translate(x, y); 
rotate(angle); // Rotate based on the angle

In the future, I would like to try to use more shapes like triangles and spirals to create visual variety. I think expanding the color choices with gradients and dynamic color changes will make the artwork more visually appealing.

Leave a Reply