POV-Ray : Newsgroups : povray.off-topic : Differential equations FTW! Server Time
11 Oct 2024 09:18:34 EDT (-0400)
  Differential equations FTW! (Message 1 to 10 of 31)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Invisible
Subject: Differential equations FTW!
Date: 4 Jan 2008 06:48:41
Message: <477e1d19$1@news.povray.org>
If you thought playing with a wavetank was fun...

http://www.falstad.com/ripple/

...then you're doing to love this...

http://texturegarden.com/java/rd/

Reaction-diffusion simulation. (Basically a chemical reaction produces 
chemicals, which diffuse out, and the reaction is reversible.) Different 
set of differential equations, same very cool organic results. My 
favourite presets are "network" and "spotty dots". (Be sure to turn off 
the hieght field option!)

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Invisible
Subject: Re: Differential equations FTW!
Date: 8 Jan 2008 05:07:06
Message: <47834b4a@news.povray.org>
Mmm, apparently I'm the only person retarded enough to actually be 
amused by these.

Then again, when I was a child, I used to sit for hours watching the 
washing machine. [Remember that when I was a child, "TV" was only 
available for a few hours a day...]

Does anybody know how either of these simulations actually work?

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Vincent Le Chevalier
Subject: Re: Differential equations FTW!
Date: 8 Jan 2008 09:01:17
Message: <4783822d$1@news.povray.org>

> Then again, when I was a child, I used to sit for hours watching the 
> washing machine. [Remember that when I was a child, "TV" was only 
> available for a few hours a day...]
> 

Actually I used to watch both TV *and* the washing machine. Imagine my 
despair when my parents bought a washing machine without the glass 
window at the front ;-)

> Does anybody know how either of these simulations actually work?
> 

I suspect they solve the differential equations in question :-D

-- 
Vincent


Post a reply to this message

From: Invisible
Subject: Re: Differential equations FTW!
Date: 8 Jan 2008 09:43:30
Message: <47838c12@news.povray.org>
>> Then again, when I was a child, I used to sit for hours watching the 
>> washing machine. [Remember that when I was a child, "TV" was only 
>> available for a few hours a day...]
>>
> 
> Actually I used to watch both TV *and* the washing machine. Imagine my 
> despair when my parents bought a washing machine without the glass 
> window at the front ;-)

That's just cruel...

>> Does anybody know how either of these simulations actually work?
> 
> I suspect they solve the differential equations in question :-D

No... really? :-P

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Paul Fuller
Subject: Re: Differential equations FTW!
Date: 8 Jan 2008 09:54:31
Message: <47838ea7@news.povray.org>
Invisible wrote:
> Mmm, apparently I'm the only person retarded enough to actually be 
> amused by these.
Not at all.

> 
> Then again, when I was a child, I used to sit for hours watching the 
> washing machine. [Remember that when I was a child, "TV" was only 
> available for a few hours a day...]
> 
> Does anybody know how either of these simulations actually work?
> 

Cellula Automata - Each cell (pixel) follows some simple rules based on 
its current state and that of its neighbours to determine its state in 
the next generation.

This particular example looks like it implements some equations that 
model the reaction of chemicals in 2D.  There are real mixtures that 
exhibit the pulsating and alternating patterns that some settings reproduce.

Fiddling around with the parameters gives some behaviours that are 
interesting and some that quickly lead to all dead, all alive or 
something else.

The number of possible combinations of the parameters is huge but there 
are typically a small number of interesting classes of behaviour on the 
boundaries between boring and chaotic.

Some behaviours strike us as biological which I think sheds light on how 
  complex life can emerge from simple chemical and physical rules.

You probably know already that this is known as 'emergent behaviour' - 
When a system exhibits some behaviour often at a large scale that you 
can't really predict from the rules.

I found a couple of nice settings.  Not sure if anything similar is in 
their presets:

			Bees	Spaceships
Rate (Agent)		1500	982
Rate (Inhibitor)	6190	12853
Speed (Agent)		230	50
Speed (Inhibitor)	85	41
Scale (Agent)		15	15
Scale (Inhibitor)	15	14

For 'Bees' start a small pattern in the middle.  One or more individuals 
proliferate by binary division and quickly fill the available space. 
Then they start to pulsate in some not quite discernible way. 
Occasionally an individual dies but the surrounding cells quickly split 
and fill the available space to repair the colony.

'Spaceships' is like the similarly named constructs in Conway's Life.  A 
bit larger and you can imagine a plasma drive towards the rear.  Start 
with a bit more random stuff and you get lots of spaceships cruising 
around.  Occasionally they meet and one or both are destroyed.  Some 
'self-repair' after close encounters.  Interesting thing is to vary the 
Speed (Inhibitor) around 41.  Take it down and the ships reduce in size. 
  At 37 they suffer spontaneous explosions after a time and are all 
destroyed.  From around 43 upwards the trailing edges continually break 
off to form new ships and it becomes too chaotic.

Fun stuff.  Thanks for the link.


Post a reply to this message

From: scott
Subject: Re: Differential equations FTW!
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

From: Invisible
Subject: Re: Differential equations FTW!
Date: 8 Jan 2008 10:05:17
Message: <4783912d$1@news.povray.org>
Paul Fuller wrote:

>> Does anybody know how either of these simulations actually work?
> 
> Cellula Automata - Each cell (pixel) follows some simple rules based on 
> its current state and that of its neighbours to determine its state in 
> the next generation.

I thought a cellula automaton is where each cell has a *finite* number 
of possible states? In this example, we have (conceptually) continuous 
rather than discrete states.

> This particular example looks like it implements some equations that 
> model the reaction of chemicals in 2D.  There are real mixtures that 
> exhibit the pulsating and alternating patterns that some settings 
> reproduce.

Indeed. That's how I found the link. ;-) I saw a TV program mention that 
the patterns of animal skins can be described by a single mathematical 
formula. Searching for this formula, I came across a document claiming 
it's due to reaction diffusion - and hence the second link, which is a 
simulation of the reaction diffusion differential equation.

Now, if I could figure out what the equation is and how it works, I 
might be able to simulate it...

> Fiddling around with the parameters gives some behaviours that are 
> interesting and some that quickly lead to all dead, all alive or 
> something else.
> 
> The number of possible combinations of the parameters is huge but there 
> are typically a small number of interesting classes of behaviour on the 
> boundaries between boring and chaotic.

Indeed, this is the case with a lot of fractals. A simple set of rules, 
iterated a sufficient number of times, gives rise to complicated and 
unpredictable behaviour, which is often quite pretty to look at. :-)

> Fun stuff.  Thanks for the link.

It's not quite as much fun, but do a search for "boids" to see some 
interesting flocking behaviour...

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Invisible
Subject: Re: Differential equations FTW!
Date: 8 Jan 2008 10:06:55
Message: <4783918f$1@news.povray.org>
scott wrote:
>>>> 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.

So... acceleration = surface curvature?

How does that change when you have things like walls? Do you have to do 
anything special at those edges?

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: Invisible
Subject: Re: Differential equations FTW!
Date: 8 Jan 2008 10:20:14
Message: <478394ae$1@news.povray.org>
scott wrote:

> 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

The 2nd partial derrivative of u with respect to t (time?) is equal to 
the square of the wave velocity multiplied by the Laplacian of u.

What the heck is a Laplacian when it's at home?

Oh, wait - it's a second-order differential operator in the N-dimenional 
Euclidian space defined as the divergence of the gradient. Obviously.

._.

Ouch.

Wikipedia - a great reference source, a rubbish way to learn brand new 
concepts. (Indeed, I've seen articles marked for revision *because* 
"Wikipedia is not a how-to". Hmm, what *is* Wikipedia then?)

-- 
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*


Post a reply to this message

From: scott
Subject: Re: Differential equations FTW!
Date: 8 Jan 2008 10:54:23
Message: <47839caf$1@news.povray.org>
>> http://en.wikipedia.org/wiki/Wave_equation
>>
>> It may look scary if you don't recognise the symbols
>
> The 2nd partial derrivative of u with respect to t (time?) is equal to the 
> square of the wave velocity multiplied by the Laplacian of u.
>
> What the heck is a Laplacian when it's at home?
>
> Oh, wait - it's a second-order differential operator in the N-dimenional 
> Euclidian space defined as the divergence of the gradient. Obviously.
>
> ._.
>
> Ouch.

Well I'm sure you know what the gradient is.  But how is it defined in more 
than one dimension?  And the divergence function?  It's all taught in vector 
calculus...

> Wikipedia - a great reference source, a rubbish way to learn brand new 
> concepts. (Indeed, I've seen articles marked for revision *because* 
> "Wikipedia is not a how-to". Hmm, what *is* Wikipedia then?)

Wikipedia is a reference, not a website full of tutorials.  Still, they 
should link at the bottom of the "vector calculus" page to some good online 
tutorial as it's really not very hard if you have a basic understanding of 
normal calculus.


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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