POV-Ray : Newsgroups : povray.binaries.images : Life Server Time
10 Aug 2024 17:27:46 EDT (-0400)
  Life (Message 1 to 10 of 24)  
Goto Latest 10 Messages Next 10 Messages >>>
From: SeeSchloss
Subject: Life
Date: 5 Sep 2004 09:07:10
Message: <413b0f7e@news.povray.org>
Hi,

I started POVing again, and since I'm in a cellular automata period, I 
implemented Conway's Game of Life in POVRay's preprocessing language, 
which gives a kind of history of the 2D world :)

Everything works fine, the only problem is that I don't want to define 
the initial state of the world in the script. Imagine the quantities of 
lines like :
#declare world[5][5] = 1;
#declare world[5][6] = 1;
... etc :/
So, for now I initialise it randomly (the attached picture is with the 
seed 1789 iirc).

Do you know if I could for example read the pixel values of a monochrome 
picture which would describe the initial state of the world ? A nice 
thing would be to have access to a picture like if it was an array, like 
<file>[1][56], which would be an rgb vector. That would be nice wouldn't 
it ?

Anyway, here's a picture of a 30x30 world, with 50 steps (you can see a
characteristic oscillator on the right) :

(ok, the environment could be improved a bit)


Post a reply to this message


Attachments:
Download 'isix-0.5-640x480-2.png' (424 KB)

Preview of image 'isix-0.5-640x480-2.png'
isix-0.5-640x480-2.png


 

From: Jaap
Subject: Re: Life
Date: 5 Sep 2004 12:40:00
Message: <web.413b406657340d83a8399d8d0@news.povray.org>
SeeSchloss <adr### [at] seeschlossorg> wrote:
> Hi,
>
> I started POVing again, and since I'm in a cellular automata period, I
> implemented Conway's Game of Life in POVRay's preprocessing language,
> which gives a kind of history of the 2D world :)
>
> Everything works fine, the only problem is that I don't want to define
> the initial state of the world in the script. Imagine the quantities of
> lines like :
> #declare world[5][5] = 1;
> #declare world[5][6] = 1;
> ... etc :/
> So, for now I initialise it randomly (the attached picture is with the
> seed 1789 iirc).
>
> Do you know if I could for example read the pixel values of a monochrome
> picture which would describe the initial state of the world ? A nice
> thing would be to have access to a picture like if it was an array

From: Shay
Subject: Re: Q: blurring bump map image in pov ?
Date: 29 Jul 2004 21:31:16
Message: <41096ca4$1@news.povray.org>

Can be done directly, if very slowly in inside POV.
To get direct access to the pixel data of your map, you can use (untested):

#local Pix = function {
   pattern {
     image_pattern { png "bump.png" }
   }
}

image is mapped in function from x=0 y=0 to x=1 y=1, so you would get
pixel <50,100> with
#local Value = Pix ( 50.5/mapwidth , 100.5/mapheight, 0 );

(re-posted by jaap)


Post a reply to this message

From: Jaap
Subject: Re: Life
Date: 5 Sep 2004 12:55:01
Message: <web.413b43b957340d83a8399d8d0@news.povray.org>
"Jaap" <jws### [at] yahoocom> wrote:
> Can be done directly, if very slowly in inside POV.
> To get direct access to the pixel data of your map, you can use (untested):
>
> #local Pix = function {
>    pattern {
>      image_pattern { png "bump.png" }
>    }
> }
>
> image is mapped in function from x=0 y=0 to x=1 y=1, so you would get
> pixel <50,100> with
> #local Value = Pix ( 50.5/mapwidth , 100.5/mapheight, 0 );
>
or read it directly from a comma-seperated text file?


Post a reply to this message

From: Darren New
Subject: Re: Life
Date: 5 Sep 2004 13:20:38
Message: <413b4ae6$1@news.povray.org>
SeeSchloss wrote:
> Anyway, here's a picture of a 30x30 world, with 50 steps (you can see a
> characteristic oscillator on the right) :

Most excellent. I've always loved CAs, and I never thought of trying to 
show a 2D CA in 3D space, altho 1D CAs in 2D space is pretty common. 
Great job!


Post a reply to this message

From: Noe Falzon
Subject: Re: Life
Date: 5 Sep 2004 14:04:12
Message: <noe.falzonPASDEPUB-58E8B7.20031905092004@news.povray.org>
In article <413b0f7e@news.povray.org>,
 SeeSchloss <adr### [at] seeschlossorg> wrote:

> Anyway, here's a picture of a 30x30 world, with 50 steps (you can see a
> characteristic oscillator on the right) :

Hey, that is great ! I love it !

> (ok, the environment could be improved a bit)

Well, it doesn't look bad to me :)

Great idea anyway !

NF
-- 
"Je ne deteste que les bourreaux" -- Albert Camus

Pour m'ecrire un mail, veuillez retirer PASDEPUB de mon adresse ;)


Post a reply to this message

From: SeeSchloss
Subject: Re: Life
Date: 5 Sep 2004 15:14:47
Message: <pan.2004.09.05.19.14.53.918412@seeschloss.org>
On Sun, 05 Sep 2004 12:50:01 -0400, Jaap wrote:

> "Jaap" <jws### [at] yahoocom> wrote:
>> Can be done directly, if very slowly in inside POV. To get direct access
>> to the pixel data of your map, you can use (untested):
>>
>> #local Pix = function {
>>    pattern {
>>      image_pattern { png "bump.png" }
>>    }
>>    }
>> }
>> image is mapped in function from x=0 y=0 to x=1 y=1, so you would get
>> pixel <50,100> with
>> #local Value = Pix ( 50.5/mapwidth , 100.5/mapheight, 0 );
>>
> or read it directly from a comma-seperated text file?

OK, I've tried what you suggested and it works fine, thank you, I hadn't
thought of using a function to do that...
It may be slow, but since it's only used once at the beginning, speed
isn't a problem.
Thanks again, that's easier to use than a text file or declares :)


Post a reply to this message

From: SeeSchloss
Subject: Re: Life
Date: 5 Sep 2004 15:20:14
Message: <pan.2004.09.05.19.20.21.147906@seeschloss.org>
On Sun, 05 Sep 2004 10:20:41 -0700, Darren New wrote:

> SeeSchloss wrote:
>> Anyway, here's a picture of a 30x30 world, with 50 steps (you can see a
>> characteristic oscillator on the right) :
> 
> Most excellent. I've always loved CAs, and I never thought of trying to
> show a 2D CA in 3D space, altho 1D CAs in 2D space is pretty common. Great
> job!

Thank you, I thought it could make some interesting shapes but I couldn't
really experiment with a random placement of the cells... now that it's
easier, maybe I will find nice things :)

A 3D CA in 4D space would be nice, too, and it's possible with POV...
if you don't care about parsing times :D


Post a reply to this message

From: SeeSchloss
Subject: Re: Life
Date: 5 Sep 2004 15:26:31
Message: <pan.2004.09.05.19.26.37.753549@seeschloss.org>
On Sun, 05 Sep 2004 20:03:19 +0200, Noe Falzon wrote:

> In article <413b0f7e@news.povray.org>,
>  SeeSchloss <adr### [at] seeschlossorg> wrote:
> 
>> Anyway, here's a picture of a 30x30 world, with 50 steps (you can see a
>> characteristic oscillator on the right) :
> 
> Hey, that is great ! I love it !

Thank you :)

>> (ok, the environment could be improved a bit)
> 
> Well, it doesn't look bad to me :)

Heh, apart from the checker (which I used at the beginning to check if
the world evolved like it should), it's a bit empty don't you think ?
On the other hand, I don't think trees and rocks would fit well next to a
cellular automaton ;)


Post a reply to this message

From: Noé Falzon
Subject: Re: Life
Date: 5 Sep 2004 16:40:27
Message: <413b79bb@news.povray.org>
SeeSchloss wrote:

> Heh, apart from the checker (which I used at the beginning to check if
> the world evolved like it should), it's a bit empty don't you think ?
> On the other hand, I don't think trees and rocks would fit well next to a
> cellular automaton ;)

Sure ;)
But the checker makes a good floor, I think, because your cells are blocks
that are not seperated. The checker remind that the world is divided in
cells. But I can't find of the floor cells have the same size than the
"living" cells.

It's a bit bare, but is very appealing, it looks as futuristic architecture.
Maybe I'll steal your idea one day ;)
NF
-- 
"From the age of Big Brother, from the age of the thought police, from a
dead man... greetings" -- George Orwell -- 1984

Veuiller retirer NO SPAM HERE de mon adresse.
Please remove NO SPAM HERE from my address.


Post a reply to this message

From: SeeSchloss
Subject: Re: Life
Date: 5 Sep 2004 17:26:21
Message: <413b847d@news.povray.org>

> SeeSchloss wrote:
> 
> 
>>Heh, apart from the checker (which I used at the beginning to check if
>>the world evolved like it should), it's a bit empty don't you think ?
>>On the other hand, I don't think trees and rocks would fit well next to a
>>cellular automaton ;)
> 
> 
> Sure ;)
> But the checker makes a good floor, I think, because your cells are blocks
> that are not seperated. The checker remind that the world is divided in
> cells. But I can't find of the floor cells have the same size than the
> "living" cells.

Well actually they do have the same size (see the attached picture, with 
only one level) but I admit it isn't visible anymore after a few levels. 
Do you think leaving a small space between the cells would be better ?
I'll try it :)

> It's a bit bare, but is very appealing, it looks as futuristic architecture.
> Maybe I'll steal your idea one day ;)

Oh, well if you're interested, I can post the source on p.text.scene-files ?


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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