Triton
Visual simulation library for ocean rendering.
|
You may also simulate the effects of impacts or explosions on the water, using the Triton::Impact class.
The size of the waves and spray resulting from the impact are a function of the energy of the impact, which is half of the impactor's mass times the square of its velocity.
For example, you might simulate a bullet of 20 grams hitting the water at 500 m/s with the following code:
This will produce a small splash, with small ripples radiating from the impact. The 0.01 value in the Impact constructor specifies an object diameter of 1 cm, which will limit the radius of the splash effect.
Or, a torpedo hitting the water has a mass of about 260 kg and a velocity of 100 m/s:
This will produce a larger effect. See the documentation for Triton::Impact::Impact() and Triton::Impact::Trigger() for more details.