|
|
scott wrote:
>> I know I've asked this before, but what's the algorithm for this?
>
> The wave equation.
>
> http://en.wikipedia.org/wiki/Wave_equation
>
> 2nd time differential of "wave value" is proportional to the 2nd spatial
> differential of "wave value"
>
> 2nd time differential is just acceleration (use it in an integrator like
> RK4 to get the new positions).
>
> 2nd spatial differential in 2D is just d2u/d2x + d2u/d2y
>
> See attached POV code.
Right. So for each pixel, measure the difference against the four
neighboring pixels, total that up, multiply by the wave propogation
constant, and that's the total acceleration for this pixel. Seems simple
enough.
What happens if the wave propogation medium propogates different
frequencies at different velocities?
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
|