For this week’s assignment the main goal was to make the letters of the word “Cotton Candy change color to shades of pink, purple, or blue and to float when the mouse hovered over them, with an automatic reset of the effect after a specified time.
One of the challenges faced was ensuring that the floating effect was smooth and visually appealing. This required fine-tuning the sine function used to calculate the floating amounts so that the movement would be gentle and continuous. Another challenge was to center the word on the canvas regardless of the window size, which involved calculating the correct positioning for each letter relative to the canvas dimensions for which I applied what we learned in class.
A highlight of the code that I’m particularly proud of is the implementation of the timed reset function. This feature automatically resets the color and floating effect every seconds, which gives the sketch a dynamic feel as it periodically returns to its original state without user intervention. This was achieved by using the modulo operator with the `frameCount` variable that keeps track of the number of frames since the sketch started.
Here’s the snippet of the code responsible for the timed reset:
// Reset colors and floating effect if (frameCount % resetInterval == 0) { resetEffects(); } // Function to reset colors and floating effect function resetEffects() { for (let i = 0; i < letters.length; i++) { letterColors[i] = color(255, 182, 193); // Reset color to pink floatingStartFrames[i] = -resetInterval; // Ensures the effect is stopped floatingAmounts[i] = 0; // Reset floating amount } }
This part of the code demonstrates the use of a simple yet powerful timing mechanism, allowing for periodic actions without the need for complex timing functions. It also shows how a clear understanding of the p5.js framework’s drawing loop can be used to create interactive and dynamic animations. Overall, despite the challenges, this project was an enjoyable and educational experience in using p5.js to create engaging visual effects.
Reading Response:
In his book, “The Design of Everyday Things,” Don Norman hits on something we all kind of know but don’t always talk about: how everyday stuff around us can be super annoying when they’re badly designed. He’s not just talking about making things pretty, he’s diving deep into why we struggle with simple things like doors and switches and how good design can make our lives way easier.
Norman drops some real talk about design concepts, like affordances and signifiers. Affordances are basically what an object lets us do, and signifiers are like hints or clues on what actions we can take. It sounds fancy, but it’s really about making stuff user-friendly.
He brings up some wild examples that show just how weird design can get. Like, ever heard of a sink in a fancy London hotel that makes you dirty your hands again just to drain it? Or a wall in Korea that wasn’t meant to be a shelf but ended up as one because it looked like it could hold your coffee cup? These stories aren’t just funny, they show how designs can mess with our heads.
Then there’s the Coffeepot for Masochists – a design so backward it’s like a joke, but it actually makes a point about how not to design things. And those confusing doors that don’t tell you whether to push or pull? We’ve all been there, and Norman uses these everyday traps to show why design needs to be clear and intuitive.
Even digital watches get a shout-out for being needlessly complicated. Why do we need a manual to tell time? On the flip side, Norman props up car seat controls that just make sense because they mimic the seat’s layout. It’s like, why can’t all things be this straightforward?
So, what’s Norman really getting at? He’s saying that design isn’t just about looking good, it’s about making our interactions with objects smooth and natural. Designers need to think about how we, as humans, use stuff and then make it as easy as possible for us. It’s about getting the small things right, so we don’t end up fighting with a door or a coffeepot. In a way, Norman’s book is a call to make the world a less frustrating place, one well-designed object at a time.