Monthly Archives: October 2020

Week 6 Recitation

For week 6 recitation, I developed a sketch based on the Object-Oriented Programming concept. I had an idea of creating a rainy and foggy picture.

First, I tried to create the clouds. 

First, I defined the cloud using “let particles”. Here, the word must be in plural form and the first letter shouldn’t be capitalized. In setup, I created a loop to create 1000 circles as to make it spread across the canvas to look like heavy clouds. After this, I went to the drawing part of the code to display the particles. This part can be changed into lots of other features based on how you want to manipulate the shapes. 

Finally, I planned how every ellipse looked like using “class”. A thing to keep in mind would be using the single form after class and capitalizing the first letter.

Now I finished with the clouds part and moved on to drawing the rain.

In the setup section, I created another loop to make 2000 raindrops.

In “class Raindrop”, I used three ways of conducting the raindrops. They were display, move and fall. By adding these three generating ways, I could make the raindrops look like they are falling.

Finally, I finished with my work. It looked like this!

Julie’s Assignment: Generative art

In this assignment, we were asked to write a code to create a generative art that showed an object that we took notice of.

I choose to draw a ferris wheel, a spinning one.

My drawing would consist of several parts: the grass, the pavement, the resting part of the ferris wheel, the moving part, and the background.

In the coding, I met several difficulties. 

First of all, I had a bit trouble replacing mouseX and mouseY with a and b. In the end, I found out that it was because I had placed “a=mouseX” and “b=mouseY” in the wrong place. Here is the right example!

Then, I wanted my coding to change the background color when “you” entered a square, so I decided to use “If and Else” to make this happen! However, at first, I failed to create the square. Professor Moon provided me with lots of help. In the end, I finally got it through!

There was another problem that I spent a great amount of time on. It was the spinning ferris wheel. This was easier to fix, since the only problem was fixing its position in the canvas.

Finally, it is done!

Also, I used 2 draw functions, 2 variables, and several colors.

Here are some pictures of my project!