NOC – HW4: Forces pt. 2 – Andrew Joslyn

Link to Presentation

Link to sketch

For this week’s forces update, I played around with applyForce() and added a reset() function for the in-class demonstration of restitution. Depending on where the user clicks and holds the mouse, you are able to reset the “bounce” of the objects, giving them greater Y trajectory or X trajectory. I kept gravity and wind in the sketch, which I probably could have done without or re-coded on my own, but I just kept the values more or less the same as what was presented in class, however I modified the forces being applied as well as the values that change velocity in order to give the example a more natural feel, and decreased the coefficient of restitution in a way that the random mass of the objects would actually impact and change behavior based on size. This was a “quick and dirty” application, but I feel my understanding of the physics aspect is fundamentally solid, and the idea of a “physics sandbox” is something that actually leaves very little room for much more, outside of adding more objects or adding more interaction, and that requires some creativity, which I unfortunately admittedly lack, haha.

NOC – Week 3: Vectors – Andrew Joslyn

Link here.

For this week, I wanted to do something, and was thinking about updating last week’s sketch with the rain and umbrella, and converting the raindrops into vectors and having them reflect or “bounce” off the umbrella, but I thought it would be much more appropriate (and maybe much less original) to make fireworks. After looking at some other people’s examples online and not being very satisfied with any of them, I took a few hours to code my own. It’s a pretty simple program I think, and writing it all really helped to further solidify my understanding of objects and constructors, arrays, and conditionals, and I think spending the time this week to code something from more or less scratch instead of just improving on something old may help me in the future once the concepts become more rigorous, since admittedly, my coding skills were sub-par entering this semester, but are I am growing more and more comfortable with P5 after not having done processing in nearly 3-4 years (since freshman year). I used comments frequently this time, and plan on continuing that not only to help others but to help myself understand what my code was doing, they helped me “find my place” a lot of the time, since scrolling up and down over and over does make the code begin to kind of blur together. Overall this week was a fun step to take, and I managed to spend most of the time coding rather than fixing errors in my code, which was nice especially since I had tried to mess with createVector() last week before I even knew that they were the next topic in class, haha. Looking forward to class tomorrow.

NOC – Week 2: OOP – Andrew Joslyn

https://editor.p5js.org/adj311/sketches/3ZRC6x9OJ

This week I decided to build on the idea we made in class and made rain with an umbrella that would block the rain. You could say I was inspired by all the “wonderful” weather in Shanghai.

This project took a little bit longer than I would like to admit, because I was trying to store position in the index within the classes themselves, and realized I could just use the variable stored with in the for loop itself to do the calculation. This seemed relatively easy for me to do to me, but ended up taking a lot of trial and error, because Googling could not help me that much. It ended up being a rewarding learning experience for me and a good way to begin being more comfortable with conditionals, arrays, and objects.

NOC – Week 1: P5.js practice – Andrew Joslyn

Link: https://editor.p5js.org/adj311/sketches/Oiz7i0tcU

I’ve always just liked stuff that looks cool, and I wanted to practice using variables and conditionals rather than simple(r) things like mouseX,Y and mouse clicks, so I tried to make something abstract that changed over time. I like the idea of having some shapes move constantly while others move sporadically, because there are always patterns in the randomness. The initial few seconds after starting the sketch are completely chaotic, and I could have done a bit to tidy it up, but after a while the concept begins to form, and black space is randomly created while being constantly filled in every few seconds. I added a focal point to both direct the eye to the middle of the sketch and so to remind the viewer to stay there. There is a pretty clear indication that the sketch changes over time, but it does kind of “expire” after letting it run for a while (a minute or two), which will reduce the random and chaotic element to essentially nothing, and the sketch will just be four rectangles growing from the center.