The assignment prompted us to create a work of art using loops and other concepts we have learned so far. Looking at the examples provided for the project, I saw many instances of graphical artworks that were created by arranging small objects and shapes into a bigger artwork iteratively, so I focused on creating some custom shape and iterating it smoothly on the whole canvas. I tried to come up with a similar concept from real life and what struck me as a typical example of small shapes iterating to create an artwork was a kaleidoscope. Hence, the idea for this project was to create a custom, colorful shape and reflect it 360 degrees around the canvas, just like the kaleidoscope does. That reflection part is shown in the following code snippet.
for (let i = 0; i < 10; i++) {
rotate(angle);
strokeWeight(8);
stroke(mouseX, colval, colval/1.5, 0.5);
line(mouseX, mouseY, pmouseX, pmouseY); //trace the mouse
push();
scale(1, -1); //reflect vertically
line(mouseX, mouseY, pmouseX, pmouseY);
pop();
push();
scale(-1, 1); //reflect horizontally
line(mouseX, mouseY, pmouseX, pmouseY);
pop();
}
The shape is drawn by hand in the upper-left corner of the canvas and gets reflected and rotated all throughout the space. The shape is drawn by hand to resemble the chaotic but appealing visuals of the kaleidoscope.
What I would like to work on in the future is more uniform construction of reflections using the appropriate angles instead of arbitrary ones. In addition to that, I would want to enable the user to draw on all of the surface of the canvas, but this might saturate the picture too much, so I yet have to find a solution for it.