View Full Version : tom kluyskens' water ripple expression?

06 June 2005, 12:59 AM
SIGGRAPH Masters of Maya seminar July 2003
Presentation Outline

Tom Kluyskens


I just can't tell what is the math behind the most tricky lines of expression,anybody kind enough can give me a hint where or in which field can i get the philosophy behind the "key" expression?As i am in China here(not so many seasoned veterans,i guess the expression has something to do with wave physics,or damping functions in math?)

he created particle collision event and stored the collision data in a vector array
global int $dropCount;
global vector $collisionData[];
if (collisionU != -1) {
$collisionData[size($collisionData)] = << collisionU, collisionV, frame>>;
lifespanPP = 0;


and then considering the distance between collision point and time factor

global vector $collisionData[];
if (frame<2) clear $collisionData;

int $i;
float $amplitude;
float $totalAmplitude = 0;

// control variables
float $frequency=100;
float $decay=4;
float $timeDecay=.01;
float $ampMult = .5;
float $speed = .25;

for ($i=0; $i< size($collisionData); $i++) {
vector $data = $collisionData[$i];

float $tdist = (frame-($data.z))*$speed;
float $dist = mag(<<si.uCoord,si.vCoord,0>> - <<($data.x),($data.y),0>>);
float $x = ($dist*$frequency - $tdist);
$amplitude= (1 - smoothstep(0,3,$x))*(1+cos($x))*exp(-$dist*$decay-$tdist*$timeDecay);

$totalAmplitude += $amplitude;


rippleRamp.vCoord = clamp(0,1,$totalAmplitude*$ampMult);

and here comes the question,what the heck are these two lines doing?

float $x = ($dist*$frequency - $tdist);
$amplitude= (1 - smoothstep(0,3,$x))*(1+cos($x))*exp(-$dist*$decay-$tdist*$timeDecay);

Albeit i am not a bachelor of math or something else associated,at least the eager of getting the lore of TD will always not change.By the way,i got my BS degree on Biochemistry and Molecular Biology,so i think i have the ability to find what i want if anyone gives me hint.any hint will be greatly appreciated.thanks in advance.

Already searched the forum and googled,but no results.I even wrote to the author sometime ago,but maybe he was busy doing something and who bear my poor english,dunno if i made myself clear.Anyway that's it.Hope u savvies give me a hand,really appreciate it.

06 June 2005, 01:37 AM
through wikipedia
from the constructin form of the variable $amplitude,i think it comes from some sort of second order differential equation,for it has the multiplier of exp(-f(t)) and cos(at+b)

CGTalk Moderation
06 June 2005, 01:37 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.