POV-Ray : Newsgroups : povray.off-topic : New CA Simulation Server Time
3 Sep 2024 19:17:55 EDT (-0400)
  New CA Simulation (Message 31 to 40 of 88)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Thibaut Jonckheere
Subject: Re: Thanks!
Date: 31 Jan 2011 17:49:27
Message: <4d473c77@news.povray.org>

> Thank you all for your input! I'd still like to hear any comments you
> might have, if you can take the time.
>

I spent more time with it, and it is really fascinating ! It looks a lot 
like some sort of physical/biological process. If you can give some 
qualitative information on the way the algorithm works, I'll be very 
interested.  A few things I like particularly:

- the different 'timescales'  : after a click with the mouse, there is 
the rapid process destroying the cell, but the system takes a long time 
to reach a steady state as a whole

- I enjoy a lot when 'thin white lines' enter a big cell, and propagate 
slowly with successive branching, changing in the end a big part of the 
entire geometry.


Thibaut


> One of my goals is to prepare a full-on cellular automata gallery that
> anyone (with a graphics card) can view.
>
> Sam


Post a reply to this message

From: Darren New
Subject: Re: New CA Simulation
Date: 31 Jan 2011 18:13:29
Message: <4d474219@news.povray.org>
stbenge wrote:
> On 1/31/2011 1:38 PM, Darren New wrote:
>> stbenge wrote:
>>> Sometimes it seems like the problems expand outward in a branching
>>> structure...
>>
>> I have coined the term Zeno's Debugger for that.
>>
>> Every time you try to figure out what's causing the error, you have to
>> first debug the tool you're using to figure out what's causing that
>> error, recursively.
> 
> But what do you call it when the only thing stopping your software's 
> deployment is one tiny exe that happens to be bundled into one humongous 
> development kit?

So you go to download the kit and you need to make up an account to download 
it. But the make-up-the-account doesn't work through the corporate firewall, 
so you go home. But your home computer has firefox and the download doesn't 
work with that. So you install Chrome and manage to sign up, but they don't 
take gmail addresses for logins. So you go to log in over the VPN, but the 
VPN software has been upgraded, so you need to take your VPN box back to 
work anyway to get reflashed. So you go back to work to download the file 
but it doesn't come through the proxy. So you bypass the proxy but there 
isn't enough temp space to download the package. So you go to back up some 
useful files but the USB drive has gone missing. So you ask around to see 
who has the USB drive .....

When, really, all you wanted was to write a f'ing piece of code.

-- 
Darren New, San Diego CA, USA (PST)
  "How did he die?"   "He got shot in the hand."
     "That was fatal?"
          "He was holding a live grenade at the time."


Post a reply to this message

From: stbenge
Subject: Re: New CA Simulation
Date: 31 Jan 2011 19:00:12
Message: <4d474d0c@news.povray.org>
On 1/31/2011 2:19 PM, Stephen wrote:
> On 31/01/2011 10:09 PM, stbenge wrote:
>> But what do you call it when the only thing stopping your software's
>> deployment is one tiny exe that happens to be bundled into one humongous
>> development kit?
>
> A b*st*rd? o_O

My inclination _is_ to to start using profane expletives, but the Zen 
method of realizing the path I must take fills me with peace. At least I 
know I /can/ resume a long, drawn-out broken download with this 
particular development kit. Fortunately, Sun hasn't taken Microsoft's 
route of providing a "user friendly" download installer that resumes the 
downloads only at 20MB intervals X_x

Sam


Post a reply to this message

From: stbenge
Subject: Re: New CA Simulation
Date: 31 Jan 2011 19:08:40
Message: <4d474f08@news.povray.org>
On 1/31/2011 3:13 PM, Darren New wrote:
> stbenge wrote:
>> But what do you call it when the only thing stopping your software's
>> deployment is one tiny exe that happens to be bundled into one
>> humongous development kit?
>
> So you go to download the kit and you need to make up an account to
> download it. But the make-up-the-account doesn't work through the
> corporate firewall, so you go home. But your home computer has firefox
> and the download doesn't work with that. So you install Chrome and
> manage to sign up, but they don't take gmail addresses for logins. So
> you go to log in over the VPN, but the VPN software has been upgraded,
> so you need to take your VPN box back to work anyway to get reflashed.
> So you go back to work to download the file but it doesn't come through
> the proxy. So you bypass the proxy but there isn't enough temp space to
> download the package. So you go to back up some useful files but the USB
> drive has gone missing. So you ask around to see who has the USB drive
> .....

Is that talking from personal experience, or extrapolating from a 
possibility? I can see that happening. If only half of what you said has 
actually happened to you, I no longer feel so bad.

> When, really, all you wanted was to write a f'ing piece of code.

I know the thing must be less than 200K, but after reading the 
license/user agreement, I know that that one tiny file can't be 
distributed singularly (without legal repercussions). At least after I 
download the monolith-of-an-development-kit, I can start learning actual 
Java and go beyond the scope of Processing.

Sam


Post a reply to this message

From: stbenge
Subject: Re: Thanks!
Date: 31 Jan 2011 20:07:51
Message: <4d475ce7@news.povray.org>
On 1/31/2011 2:49 PM, Thibaut Jonckheere wrote:

>> Thank you all for your input! I'd still like to hear any comments you
>> might have, if you can take the time.
>
> A few things I like particularly:
>
> - the different 'timescales' : after a click with the mouse, there is
> the rapid process destroying the cell, but the system takes a long time
> to reach a steady state as a whole

Well... cellular automaton simulations are an entirely natural process, 
so these things happen as a matter of consequence. As to just 
/what/exactly/ is being modeled is determined by the purity of the 
calculations. I know that some of my calculations have resulted in an 
approximation of a minimal surface, but others were added to increase 
growth. So maybe we have a biological organism with a lot of mucus...

> - I enjoy a lot when 'thin white lines' enter a big cell, and propagate
> slowly with successive branching, changing in the end a big part of the
> entire geometry.

That's one of the things that puts this sim into its own category. What 
you are seeing is related to reaction/diffusion and minimal surface 
systems, but I really don't think that its behavior is indicative of a 
"pure" minimal surface.

> I spent more time with it, and it is really fascinating ! It looks a lot
> like some sort of physical/biological process. If you can give some
> qualitative information on the way the algorithm works, I'll be very
> interested.

I can't really explain what I did. I know *what* I did, and *why* it 
does it, but ask me to put it into scientific or mathematical terms, and 
you won't get a satisfactory answer.

But here's the GLSL code. I'll attempt to provide useful descriptions:

// these uniform variables are piped in from the governing program:
uniform sampler2D bufA; // a 768x768 16-bit surface
uniform vec2 offset;    // offset.s = 1/768, offset.t = 1/768
uniform int DoPaint;    // is the mouse clicked? (a boolean would be better)
uniform float MX, MY, RX, RY; // mouse X/Y, random values X/Y

// variables for the red, green & blue components
float R, G, B;

// CA      = blur sample
// C0 - C8 = point samples
vec4 CA, C0, C1, C2, C3, C4, C5, C6, C7, C8;

// a noise function (not mine, used for adding noise to Area_Add[below])
float rand(vec2 UV){
  return

  fract(
   sin(
    dot(
     vec2(
      UV.x+RX,
      UV.y+RY
     ),
     vec2(12.9898,78.233)
    )
   )*43758.5453
  );
}

void main(void){

   float dx = offset.s; // 1/768
   float dy = offset.t; // 1/768

   // UV.x = 0.0 to 1.0, UV.y = 0.0 to 1.0
   vec2  UV = gl_TexCoord[0].st;

   // expansion vector (realized with POV)
   // uses the green channel
   vec2 Expansion =
    .0625*vec2(
      texture2D( bufA, UV + .5*vec2(-dx, 0.0) ).g
     -texture2D( bufA, UV + .5*vec2(dx, 0.0) ).g,
      texture2D( bufA, UV + .5*vec2(0.0, -dy) ).g
     -texture2D( bufA, UV + .5*vec2(0.0, dy) ).g
    );

   // applying the expansion to "UV"
   UV += 1.0*Expansion*(texture2D( bufA, UV).g);

   // center sample
   C0 = texture2D( bufA, UV);

   // samples clockwise from upper-left
   // total (with C0): 1 + 2 + .92 = 3.92 (values are also thanks to POV)
   C1 = texture2D( bufA, UV + vec2(-dx, -dy) )*0.23;
   C2 = texture2D( bufA, UV + vec2(0.0, -dy) )*0.5;
   C3 = texture2D( bufA, UV + vec2(+dx, -dy) )*0.23;
   C4 = texture2D( bufA, UV + vec2(+dx, 0.0) )*0.5;
   C5 = texture2D( bufA, UV + vec2(+dx, +dy) )*0.23;
   C6 = texture2D( bufA, UV + vec2(0.0, +dy) )*0.5;
   C7 = texture2D( bufA, UV + vec2(-dx, +dy) )*0.23;
   C8 = texture2D( bufA, UV + vec2(-dx, 0.0) )*0.5;

   // blur sample
   CA = (C0+C1+C2+C3+C4+C5+C6+C7+C8)/3.92;

   if(DoPaint==1){ // paint circular area

    // adds a noisy, circular density when the mouse is clicked
    float Area_Add =
     rand(UV)*clamp(
      1.0-16.0*sqrt( pow(UV.x-MX, 2.0) + pow(UV.y-MY, 2.0) ),
      0.0,
      1.0
     );

    // adds a noisy, circular density when the mouse is clicked
    R = clamp(CA.r + .05*Area_Add, 0.0, 1.0);

    // green is given a blurred version of the red channel
    G = CA.r;

    // blue is given a blurred version of its own channel
    B = CA.b;

   }else{          // return the usual values

    R = CA.r;
    G = CA.r;
    B = CA.b;

   }

   // edge-finding
   B = C0.r+(C0.r-CA.r)*760.0;

   // mix old values with squared edge values
   // ("mix" is the same as a linear interpolation["lerp"])
   B = mix(CA.b, B*B, .025);

   // add blurred edges to primary evaluation channel
   // and decrease all red values over time
   R = R + .045*CA.b - .0203065;

   // subtract blurred edge values from the green channel
   G = G - .107*CA.b;

   // prevent values from going below 0.0 (black) or above 1.0 (white)
   R = clamp(R, 0.0, 1.0);
   G = clamp(G, 0.0, 1.0);
   B = clamp(B, 0.0, 1.0);

   // carry values over to next iteration
   gl_FragColor = vec4(R, G, B, 1.0);

}


Post a reply to this message

From: Darren New
Subject: Re: New CA Simulation
Date: 31 Jan 2011 20:30:05
Message: <4d47621d$1@news.povray.org>
stbenge wrote:
> Is that talking from personal experience, or extrapolating from a 
> possibility? I can see that happening.

That was a description of the *kind* of thing that happened to me on a 
regular basis at my previous job, yes. Between the code and the people 
providing the code, it was the most distasteful job I've ever had, really. 
And that counts customer service at the deli.

-- 
Darren New, San Diego CA, USA (PST)
  "How did he die?"   "He got shot in the hand."
     "That was fatal?"
          "He was holding a live grenade at the time."


Post a reply to this message

From: Stephen
Subject: Re: New CA Simulation
Date: 31 Jan 2011 20:30:57
Message: <4d476251$1@news.povray.org>
On 01/02/2011 12:00 AM, stbenge wrote:
> My inclination _is_ to to start using profane expletives, but the Zen
> method of realizing the path I must take fills me with peace.

Ah! My son. You will realise, after years of study and training that the 
circle can be completed and the mind’s control of the body is as nothing 
to letting rip when the hammer of fate connects with the thumb of life.
So take yourself into the desert and kick the coyote until He gives you 
the gift of fire.


-- 
Regards
     Stephen


Post a reply to this message

From: stbenge
Subject: Re: New CA Simulation
Date: 31 Jan 2011 21:15:36
Message: <4d476cc8@news.povray.org>
On 1/31/2011 5:30 PM, Stephen wrote:
> On 01/02/2011 12:00 AM, stbenge wrote:
>> My inclination _is_ to to start using profane expletives, but the Zen
>> method of realizing the path I must take fills me with peace.
>
> Ah! My son.

You aren't my father! No! No! (getting carried away with Star Wars 
geekiabilia there)

> You will realise, after years of study and training that the
> circle can be completed and the mind’s control of the body is as nothing
> to letting rip when the hammer of fate connects with the thumb of life.
> So take yourself into the desert and kick the coyote until He gives you
> the gift of fire.

I've done that, but it really doesn't work. Expressing emotional turmoil 
to desert creatures (or other socially arid inhabitants) doesn't really 
accomplish much, although you /do/ get some exercise.

Sam


Post a reply to this message

From: Darren New
Subject: Re: New CA Simulation
Date: 31 Jan 2011 21:54:23
Message: <4d4775df$1@news.povray.org>
stbenge wrote:
> My inclination _is_ to to start using profane expletives, 

Profanity is my number one debugging tool.

-- 
Darren New, San Diego CA, USA (PST)
  "How did he die?"   "He got shot in the hand."
     "That was fatal?"
          "He was holding a live grenade at the time."


Post a reply to this message

From: scott
Subject: Re: New CA Simulation
Date: 1 Feb 2011 03:39:35
Message: <4d47c6c7$1@news.povray.org>
> As it turns out, there were two places to change the window size, so it
> should be fixed now.

OK it's working now, very smooth.


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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