This sketch procedurally animates a sacred geometry mandala inspired by the iconic cover of Ram Dassโs book Be Here Now. Using nested loops and trigonometric functions (cos and sin), the code maps 12 focal points to draw radial center lines and an intricate geometric network. Controlled by an animation clock (currentStep), each line appears sequentially in a rhythmic tempo. As the web completes, decorative concentric circles and vertex nodes emerge, holding a brief moment of visual stillness before gracefully resetting.


My Thoughts:
The prompt notes that "our ability to see patterns is what makes us human." At the same time, one of the most challenging tasks for us as humans is simply to "Be Here Now", to remain fully present without getting lost in past regrets or future anxieties. In this assignment, I wanted to use our defining human trait, our instinct for pattern recognition, as a helpful bridge toward achieving that state of presence.
Throughout history, many spiritual traditions across the world have drawn mandalas and repetitive geometric patterns for this exact reason. By translating Ram Dass's iconic book cover into p5.js, I explored how algorithmic repetition, a single nested loop executing trigonometric rules, can serve as a meditative anchor. By engaging our brain's natural tendency to seek patterns, the drawing process gently quiets mental chatter and helps us arrive at the present moment.
for (let i = 0; i < points; i++) {
for (let j = i + 1; j < points; j++) {
currentLine = currentLine + 1;
if ((j - i) % 6 >= 1)
if (currentLine <= currentStep) {
// draw cross-connecting lines
}
}
}
Why it's interesting:
Instead of manually writing dozens of individual line() calls, a nested for loop dynamically calculates all vector connections between the 12 nodes. What makes this block particularly fascinating is the modulo condition (j - i) % 6 >= 1. This mathematical rule filters out 6-step diameter lines that would directly overlap with the 12 radial lines already drawn in Stage 1, while allowing all other cross-connecting web lines to flourish. Furthermore, incrementing currentLine inside the loop seamlessly pairs geometric connection logic with sequential animation timing (currentStep), turning code repetition into an organic progression of sacred geometry.Line Number(s): 38โ43