How to simulate dynamic waves in 2D

Hi,

I would like to create a simulation of water waves, but it 2D, like you're looking at the edge of an aquarium; the bottom half is under water, the top half is above water.

The water needs to respond to a force/vibration that changes over time, extracted from audio amplitude. When the amplitude goes up the waves become more violent.

I was thinking about doing this by creating a horizontal string of particles which are connected to each other with springs. Then allow them to only move in the vertical direction, and apply the force to one of them, making the others bounce in response. Does this sound like a good idea? Or would you take a different approach?

I'm an experienced programmer, but I don't have a lot of experience with Processing. So if there is a relevant example floating around (toxiclibs?) or you have different suggestions all help is appreciated.

Thanks

Answers

Sign In or Register to comment.