#### Archived

This topic is now archived and is closed to further replies.

# Ocean surf representation

This topic is 7285 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

OK, this is the problem.
I need to display a nice looking animation of some ocean waves (surf) in 3D. It would be preferable if the camera could zoom in and out and circle around the surf break.
I was thinking of using Direct3D for the rendering because it makes things simple and fast.
The tricky bit is how to store a wave in memory.

I have devised two possible methods:
1) A huge particle system (ideally with H2O molecule size particles). This is slow and takes shitloads of memory but is realitively simple I guess (maybe a large linked list?).

2) Acutally applying wave theorm and physics laws and differential equations to calculate the shape of the 3D surface plane. This is slow but requires little memory, but gives me a migraine even contemplating it.

Can you fellas think of some other way to achieve this?

##### Share on other sites
Actually I saw a special once on the physics of waves (or maybe it was an article in Discovery magazine back when it was a decent magazine, unsure...) It could get a little nasty.
Basically surf "breaks" because the bottom of the wave starts dragging on the ocean floor, which makes it top-heavy. Note that the "bottom" of the wave is a lot deeper than the trough. When the friction becomes great enough, it unbalances and circular currents that occur in waves in pseudo-cylinders perpendicular to the direction of travel cause it to curl. Other than that all you would need is a normal oscillating sine wave to draw your ocean before the breaker point. There is probably a paper somewhere on the math involved as I've seen a few models of it, you might want to see if it's posted somewhere.
As for camera angles, if you can get the wave math to work, moving a camera around should be a breeze.

g'luck, you'll need it *smile*
-fel

• 11
• 9
• 10
• 24
• 13