Please see my code here: https://editor.p5js.org/Jenny-yw/sketches
My finished drawing - Robot
I draw and paint either on paper or on my iPad for fun in my free time, but I've never thought I could use codes to draw. Even though it's unnatural for me to create this way, I enjoyed the process, and made me start thinking differently about creating. The first thing that came to my mind was robots, so I started drawing the robot I want to code on paper.
Robot drawing
As I was creating shapes for the robot, I was wondering how I could find the exact coordinates for all the shapes so that I can put them together just as my drawing. The first thing I tried was to eyeball the coordinate and trying different coordinates until I got the result I wanted. That method was pretty time consuming, and I lost track as I was calculating them. I thought there must be a better way to find the exact coordinates, so I googled "how to find coordinates on p5.js". Google is my best friend. This is one of the resources I found helpful https://p5js.org/examples/structure-coordinates.html. I divided the canvas into 10 grids and used the formula to calculate coordinates by using canvas's width and height.
As I was getting familiar and fluent with coordinates and shapes, I had trouble drawing curves. I didn't understand the reference and what all the variable are for. However, after playing around with the numbers, I drew 2 lines first, then used (mouseX, mouseY) to find the curve, which made the process easier.
Figure 1
When I was trying different shapes and figuring out coordinates for curves. I got this error (see Figure 1) that took me a while to figure out. I didn't notice that I wrote two curly brackets, which turned my canvas to be blank.
Overall, it's cool to see what codes can create, and I'm looking forward to adding interactions as well. I think it will take a while for me to get familiar with all the functions and what they can do. So, practice is definitely the key.
How computation applies to my interest
I have never coded or using codes as a medium to create, however; through doing the homework and looking at other people's works, I see a different kind of creation that allows people to break barriers and create somethings a paint brush can't do, especially for a large scale installation arts. I love the teamLab's ever blossoming life installation. It does not only look cool, but only allows people to visualize what beautiful every blossoming cherry tree looks like. It's like a dream come true for those who love cherry blossom. I like the idea of creating stimulation visuals that go along with the music and people can interact with for the purpose of soothing, relaxation, or mediation.
Comentarios