POV-Ray : Newsgroups : povray.off-topic : Differential equations FTW! : Re: Differential equations FTW! Server Time
14 Nov 2024 22:25:01 EST (-0500)
  Re: Differential equations FTW!  
From: scott
Date: 8 Jan 2008 10:03:15
Message: <478390b3$1@news.povray.org>
>>> Does anybody know how either of these simulations actually work?
>>
>> I suspect they solve the differential equations in question :-D
>
> No... really? :-P

Really.

The wave tank one is easy, for every "pixel" it simply solves the wave 
equation.

http://en.wikipedia.org/wiki/Wave_equation

It may look scary if you don't recognise the symbols, but the maths is 
actually quite trivial.  All the wave equation says is that the 2nd 
derivative wrt to time (ie acceleration) of the value of each pixel is 
proportional to the 2nd derivative of the value wrt to distance summed over 
every axis.

It's easy to code, you can just take the difference between neighbouring 
pixel values twice to work out the 2nd derivative in the x and y direction 
and hence the acceleration.  Then the acceleration can be used to work out 
the velocity and new value using Euler integration.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.