https://docs.google.com/presentation/d/1slUNgHSCPCd7cluEdwEpFDshOnIvoqiWz7reH3bn-GM/edit?usp=sharing
NOC-Week 4: Inspirations (Lily)
NOC-Week 4: Slide On Ice – Force (Lily)
The environment that I have built in this sketch is a rock falling down from above onto the ice.
Based on the sketch we made last week in class, I added a condition to check the boundary of ice so that the rock can stop when it hits the ice. Originally, I intended to add a support force that was the opposite of the gravity, but that did not work. Moon suggested using restitution, flipping and decreasing the velocity after each collision.
With the wind function, one can move the rock on the ice based on the mouse X position. There is also the resistance of the ice so that the speed of the rock will gradually decrease.
NOC-Week 3: Raindrops-Vectors (Lily)
I used vectors and OOP to create raindrops in this sketch.
Instead of using X and Y positions as separate variables, I created vectors for the position, the velocity, and the acceleration for each raindrop object. The acceleration is used to simulate the raindrops in real life.
In terms of the background, I used what Prof. Moon has talked about in his workshop last week to make the color change gradually from blue to pink.
When the user presses the mouse, the rain will slowly stop dropping and stay in the air, just like when time stops in those sci-fi movies.
Also, I wanted to create another interaction that allows the user to use the mouse to drive away the raindrops. But I have not managed to finish it by the time I am writing this documentation.
Here is a link to what I have accomplished so far. I will update it as soon as I finish tackling the problem.
https://editor.p5js.org/py561@nyu.edu/sketches/7whgW_611
Updated:
Eventually, with the help of Dave, I managed to debug and found that the reason why it did not work out earlier was that I made a mistake while translating the raindrops. I should put “line(0, 0, 0, length)” instead of “line(posX, 0, posX, length)”.
NOC-Week 2: OOP Firefly (Lily)
For this sketch, I used particles to simulate fireflies.
In the class of Particle, there is a constructor that generates objects based on the mouse position, a display method to display all the objects, a move function to move them, and a wind function to make them shake a bit when the mouse is pressed.
I used the model of the snow but changed the larger ellipse to yellow and the smaller ellipse to green. Also, in the display function, I used a random function to make the fireflies twinkle.
Everything begins with a single click. Then there will be fireflies generated as the mouse moves. And if the mouse is pressed, all of the fireflies will begin to shake.