Concept
When I was trying to come up with an idea on what art to create, I tried to sketch different styles, 3D, pressable, not pressable, colorful, black and white. But I wasn’t fully satisfied with the end result and couldn’t get myself to code. I was scrolling shorts and I saw one that said “Why do we still have these in a store?” and the first thing he showed was a kaleidoscope (link to short: https://youtube.com/shorts/vnFYE48zqIA?si=TGT7zf0O8515eiQ_).
When I was a child kaleidoscope was my favorite thing ever, but I would also break it eventually to get the pretty stones out of it (lmao). So then I thought, why not recreate that pattern? I also thought that the most interesting art is usually interactive. That was when I came up with the idea to make a kaleidoscope, an individual one, the one that people can customize and interact with.
Production
I didn’t really understand how to make it work and this YouTube tutorial helped me a lot: https://youtu.be/KcHqRAM0sEU?si=AfDeL56RTEBYEjbl . I watched it and customized the code as I wanted.
I first made a usual one:
Press C to clear the canvas.
But then I wanted to make it more interesting, so I added a function where the sketch disappears every second:
Try drawing simple circles and rectangles in one place along the rhythm of one second
Difficulties and favorite part of code:
The code itself is very short and was’t so difficult to make. What actually challenged me was understanding how to do it initially. And once I got the concept I was able to create without further struggles.
One part of the code that I liked was the function that draws a line in a random color, and then draws a vertically mirrored “reflection” of that line.
function drawReflection(x, y, px, py) { strokeWeight(7); stroke(random(255), random(255), random(255)); line(x, y, px, py); push(); scale(1, -1); line(x, y, px, py); pop(); }
Conclusion:
I really enjoyed seeing how a small code can create very interesting customizable designs, and overall it was really interesting to do.