POV-Ray : Newsgroups : povray.advanced-users : A ripple Server Time
27 Dec 2024 06:44:54 EST (-0500)
  A ripple (Message 1 to 7 of 7)  
From: Carl
Subject: A ripple
Date: 11 Nov 2004 17:40:01
Message: <web.4193e926563ee4c0a54c62600@news.povray.org>
This is sort of a follow-up to my wake question.  I have a flat plane and
I'm wanting to animate the ripples heading outward from a single
disturbance at x=0, y=0 and t=0.  I've had a wave theory class but that was
nearly 20 years ago.

Can someone tell me the function z = f(x,y,t) or maybe even just z = f(r,t).
 I'm comfortable with terms like "2D Wave Equation" and "Dirac Delta
Function" but I'm just a little too rusty to try and derive the solution
I'm after.  I'm pretty sure there is a close form solution to this problem
as I think I've seen it before but after two days of looking on-line I've
about given up.

Help,
Carl


Post a reply to this message

From: Warp
Subject: Re: A ripple
Date: 12 Nov 2004 05:50:10
Message: <41949562@news.povray.org>
Carl <car### [at] semisouthcom> wrote:
> This is sort of a follow-up to my wake question.  I have a flat plane and
> I'm wanting to animate the ripples heading outward from a single
> disturbance at x=0, y=0 and t=0.

  Well, you can get the distance of any point from (0,0) with sqrt(x*x+y*y).
Then all you have to do is to use this distance to elevate the point
according to it. For example:

amplitude*sin(frequency*sqrt(x*x+y*y))

  If you want the wave to go outwards a full period when t goes from 0 to 1,
you just add it to the "angle":

amplitude*sin(frequency*sqrt(x*x+y*y) + t*2*pi)

  You can, naturally, get more more complex waves by adding other
waveforms, but that's a bit more complicated issue.

-- 
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}//  - Warp -


Post a reply to this message

From: Warp
Subject: Re: A ripple
Date: 12 Nov 2004 06:03:15
Message: <41949873@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
>   If you want the wave to go outwards a full period when t goes from 0 to 1,
> you just add it to the "angle":

> amplitude*sin(frequency*sqrt(x*x+y*y) + t*2*pi)

  Btw, thinking about it, I think if you want the wave to go outwards
you have to use a - instead of a +. Anyways, you should have got the
basic idea.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Carl
Subject: Re: A ripple
Date: 12 Nov 2004 10:45:00
Message: <web.4194d9b3442a937da54c62600@news.povray.org>
This isn't quite what I'm after.  This is the steady state sometime after a
disturbance has been pulling the point at x=0, y=0, back and forth between
amplitude and -amplitude according to amplitude*sin(2*pi*t).

What I'm wanting is just a one time kick (at t=0) to occure at x=0, y=0.
The ripples sould head outward and the amplitude of the oscillation at x=0,
y=0 should decay back to zero.  It's the solution to the 2D Wave Equation
with the initial state defined as a Dirac Delta Function.  It's probably
been nearly 20 years since I saw the solution to this but it may have made
use of Bessel functions.

Carl


Warp <war### [at] tagpovrayorg> wrote:
> Warp <war### [at] tagpovrayorg> wrote:
> >   If you want the wave to go outwards a full period when t goes from 0 to 1,
> > you just add it to the "angle":
>
> > amplitude*sin(frequency*sqrt(x*x+y*y) + t*2*pi)
>
>   Btw, thinking about it, I think if you want the wave to go outwards
> you have to use a - instead of a +. Anyways, you should have got the
> basic idea.
>
> --
> #macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
> N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
> N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Mueen Nawaz
Subject: Re: A ripple
Date: 2 Dec 2004 03:16:00
Message: <41aecf40@news.povray.org>
Carl wrote:
> What I'm wanting is just a one time kick (at t=0) to occure at x=0, y=0.
> The ripples sould head outward and the amplitude of the oscillation at x=0,
> y=0 should decay back to zero.  It's the solution to the 2D Wave Equation
> with the initial state defined as a Dirac Delta Function.  It's probably
> been nearly 20 years since I saw the solution to this but it may have made
> use of Bessel functions.

I'm a little too lazy to solve it myself right now, but hopefully my 
writing this will remind me to work on it.

I know that in 3-D, for spherical waves, it's given by:

amplitude = (A/abs(r))*exp(i*k.r)

(Looks better on paper). Basically, A is just some constant. r is the 
vector from the starting point. k is the wave number (as a vector in 
3-D), i is the sqrt of -1, and the . between k and r means a dot product.

Now after writing this, I'm not too sure what you want. My one above (in 
3-D), gives the result at a given instant in time, and is only spatially 
dependent. As such, the "decay" is outwards in space, not in time.

It was solved without any delta functions - just a solution to the wave 
equation assuming spherical symmetry, and harmonic solutions.

I think I just had an idea on what you're looking for. If I restrict 
myself to 1-D, and introduce a pulse (as the source - your delta 
function here), that pulse will travel outwards, become of finite 
amplitude, and will spread over time. The pulse actually becomes a 
Gaussian (as the limit of a Gaussian is a delta function).

Looking in a physics text book, I see one solution (assuming the initial 
disturbance was a Gaussian - not delta) as:

amplitude = (a*sqrt(2*pi*(1 + (t/T)^2)))^(-1) *
             exp(-(x - v*t)^2/(2*a^2*(1 + (t/T)^2)))

Looks nicer on paper too. The first "term" is actually in the 
denominator (hence the negative power). The second "term" is all in the 
exponential.

So that's a traveling wave in 1-D. t is time, x is distance from source, 
v is the velocity, a (or a^2) is the spread of the initial Gaussian. T 
is a constant that I can't quite figure out, but is dependent on certain 
parameters involving the wave packet. I'll just do the engineering hand 
wave and suggest you just experiment with various constants for T.

In case the above does not look familiar write it out with t=0, that 
should look like a clear Gaussian. The first "term" is the amplitude, 
the second is the spread. Now note that when t is finite and greater 
than 0, replace a with a*sqrt(1 + (t/T)^2) and consider it to be the 
"new" a. Again, you get a Gaussian, but with a bigger a (hence smaller 
amplitude and wider spread).

(Oh, and BTW, according to my text book, if the initial disturbance were 
a true delta function, (i.e. a = 0), no spreading would occur, so just 
set a to be small).

Phew! I feel bad I had to look up the physics book and not derive it 
from pure math. It's sad how often we rely on the sciences/engineering 
to solve math problems, and not the other way round.

For 2-D, just replace x with sqrt(x*x + y*y) is my guess. Not entirely 
sure, let me know if that works.

Bessel functions, BTW, usually arise in cylindrical geometries.

--
Mueen Nawaz


Post a reply to this message

From: Carl
Subject: Re: A ripple
Date: 6 Dec 2004 12:50:00
Message: <web.41b49b48442a937da54c62600@news.povray.org>
> amplitude = (a*sqrt(2*pi*(1 + (t/T)^2)))^(-1) *
>              exp(-(x - v*t)^2/(2*a^2*(1 + (t/T)^2)))

Shouldn't this amplitude term be multiplied by some sine or cosine term?

> For 2-D, just replace x with sqrt(x*x + y*y) is my guess. Not entirely
> sure, let me know if that works.

I don't think that's physically valid as the energy disipates faster in 2D
then it does in 1D but this multiplied by some sine or cosine term might
look good enough for an animation.  I'll play with it some when I get a
free moment or two and let you know.  Be patient.

> Bessel functions, BTW, usually arise in cylindrical geometries.

Well we have an infinite plane in the x-y directions and a disturbance in
the z direction.  Doesn't that put us in a situation with cylindrical
symmetry?

Carl


Post a reply to this message

From: Captain Chemistry
Subject: Re: A ripple
Date: 7 Dec 2004 02:20:00
Message: <web.41b5594d442a937d301d03a70@news.povray.org>
"Carl" <car### [at] semisouthcom> wrote:
> This is sort of a follow-up to my wake question.  I have a flat plane and
> I'm wanting to animate the ripples heading outward from a single
> disturbance at x=0, y=0 and t=0.  I've had a wave theory class but that was
> nearly 20 years ago.
>
> Can someone tell me the function z = f(x,y,t) or maybe even just z = f(r,t).
>  I'm comfortable with terms like "2D Wave Equation" and "Dirac Delta
> Function" but I'm just a little too rusty to try and derive the solution
> I'm after.  I'm pretty sure there is a close form solution to this problem
> as I think I've seen it before but after two days of looking on-line I've
> about given up.
>
> Help,
> Carl


I don't know if this is what you're after but this is an exerpt from the pov
help file regarding the ripples pattern:

"Usually the ripples from any given center are about 1 unit apart. The
frequency keyword changes the spacing between ripples. The phase keyword
can be used to move the ripples outwards for realistic animation."

You can use "phase" (I assume a value between 0 and 2*pi) to move the
ripples.

I wish I could tell you the maths but I'm rusty in that particular area.

Nathan


Post a reply to this message

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