When given the chance to create geometric art, my mind immediately went back to a tradition from my childhood. Since I was ten years old, every Diwali, my family and I would gather outside our home to make rangoli: a colorful pattern made on the floor with powders, flowers, or rice. Diwali, the festival of lights, is celebrated in India with lamps, sweets, and vibrant designs meant to welcome prosperity and joy into the home. For me, rangoli has always been a way to blend creativity with culture. Alongside this, I also grew up enjoying drawing mandalas, which share the same symmetrical and intricate qualities. Together, these influences shaped my concept. A digital reinterpretation of rangoli through geometric art.
For the scope of this assignment, I decided to use two shapes: circles and triangles. The circles form the core of the design, anchoring the artwork, while the triangles create a layered geometric background effect. This simple structure captures both the symmetry of mandalas and the festive layering of rangoli.
Rangoli:

Mandala:

One section of my code that I am particularly proud of is the logic behind alternating triangle shapes. I wanted two different kinds of triangles to appear in an alternating pattern. While drawing a single triangle was straightforward, alternating between two variations required more thought. After experimenting, I realized I could use an ‘if’ condition based on coordinate positions. The logic I arrived at was:
let step = 50;
for (let x = 0; x < width; x += step) {
for (let y = 0; y < height; y += step) {
// pattern A
if ((x / step + y / step) % 2 == 0) {
fill("#800000");
triangle(x, y, x + step, y, x, y + step);
fill("#000080");
triangle(x + step, y + step, x + step, y, x, y + step);
}
// pattern B
else {
fill("#000080");
triangle(x, y, x + step, y + step, x, y + step);
fill("#800000");
triangle(x, y, x + step, y, x + step, y + step);
}
}
}
This simple equation gave me an alternating algorithm, ensuring the triangles switched consistently across the canvas along with their colours.
In the future, I would like the artwork to become more dynamic and closer to an actual rangoli design. I imagine the outer circles slowly rotating, smaller circles filled with different colors, and more intricate shapes combining into floral or star-like motifs. Expanding beyond just circles and triangles would also bring the piece closer to the vibrancy of traditional rangoli while preserving its digital, algorithmic foundation.
This project allowed me to merge childhood memories, cultural traditions, and coding in a way that felt both nostalgic and innovative. Just as rangoli brings people together during Diwali, I hope this digital version shows how art and technology can come together to celebrate tradition in new ways.