Concept:
As a true island girl, the beach has always held a special place in my heart. It’s not just one of my favourite places in the world; it’s where I find peace and calm. There’s something really magical about being at the beach at night—when the darkness hides your view, but you can still feel the water, hear the rhythm of the waves, and see the moon reflected on the surface. This inspired me to create an ocean scene for this project, with waves at the height of their movement, each with its own unique personality through acceleration.
https://www.youtube.com/watch?v=kT-f2mfNL7s
Embedded Sketch:
Key Features:
In my code, acceleration controls how fast the waves move. You can increase or decrease the speed by pressing the right or left arrow keys:
Pressing the right arrow increases acceleration, making the waves move faster.
Pressing the left arrow decreases acceleration, slowing the waves down.
The movement is smooth because acceleration gradually adjusts the wave speed rather than changing it instantly, making the effect feel more natural. This simulates a build-up or reduction in wave intensity, similar to real ocean waves building up momentum.
Highlight of Code:
One of the most rewarding aspects of this project was simulating the moon’s gravitational pull on the waves. I’m particularly proud of how I captured the subtle way the waves respond to the moon’s slow journey across the sky. The moon’s movement mimics the natural pull of gravity, affecting the height and behaviour of the waves as they interact.
// Slow down the moon's movement, simulating gravitational influence moonX = map(noise(frameCount * 0.005), 0, 1, 0, width); // Slow, subtle horizontal movement // Slightly adjust wave height based on moon's horizontal position (gravity effect) let gravitationalEffect = map(moonX, 0, width, -20, 20); // Subtle effect let y = noise(frameCount * noiseSpeed + i + j) * noiseHeight + noiseY + offsetY + gravitationalEffect;
Reflection and Future Work:
Though the project didn’t quite reach the full vision I had in mind, I’m proud of how it turned out. I originally hoped to simulate waves crashing onto the shore and to add more elements like sound and depth to the sketch. These are definitely areas I plan to improve on in future iterations, but I feel this piece captures the essence of the ocean that I love so much.