 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
SeeSchloss <adr### [at] seeschloss org> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Jaap" <jws### [at] yahoo com> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <413b0f7e@news.povray.org>,
SeeSchloss <adr### [at] seeschloss org> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Sun, 05 Sep 2004 12:50:01 -0400, Jaap wrote:
> "Jaap" <jws### [at] yahoo com> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Sun, 05 Sep 2004 20:03:19 +0200, Noe Falzon wrote:
> In article <413b0f7e@news.povray.org>,
> SeeSchloss <adr### [at] seeschloss org> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Noé Falzon wrote:
> 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
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
SeeSchloss wrote:
> Noé Falzon wrote:
>
>> 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 ?
Hmm... seeing the attached picture would be easier if there _was_ an
attached picture, don't you think ? :D
Post a reply to this message
Attachments:
Download 'exemple-echiquier.jpg' (25 KB)
Preview of image 'exemple-echiquier.jpg'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <413b85bc@news.povray.org>,
SeeSchloss <adr### [at] seeschloss org> wrote:
> > Oh, well if you're interested, I can post the source on
> > p.text.scene-files ?
Oh, thank you very much, but I think I would do that with an external
little program (that would probably run a lot faster than povray) that
would generate the scene. If I do that quickly, I will keep you aware of
that !
But yes, go on, please.
> Hmm... seeing the attached picture would be easier if there _was_ an
> attached picture, don't you think ? :D
Yep, certainly :) Thanks !
NF
--
"Je ne deteste que les bourreaux" -- Albert Camus
Pour m'écrire un mail, veuillez retirer PASDEPUB de mon adresse ;)
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> 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 :)
It might be interesting to start with an image of your name and see what
that looks like three generations down the line.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Mon, 06 Sep 2004 07:06:38 +0200, Noé Falzon wrote:
> In article <413b85bc@news.povray.org>,
> SeeSchloss <adr### [at] seeschloss org> wrote:
>
>> > Oh, well if you're interested, I can post the source on
>> > p.text.scene-files ?
>
> Oh, thank you very much, but I think I would do that with an external
> little program (that would probably run a lot faster than povray) that
> would generate the scene. If I do that quickly, I will keep you aware of
> that !
Well I posted it, maybe someone else is interested. I've already
done a program which could probably have been modified to output something
usable by POV, but I'm not very experienced at parsing external files with
it... and it was funnier to do it completely with POV :D
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
SeeSchloss 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, 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)
>
> ------------------------------------------------------------------------
>
I like the idea. I remember looking at some CA stuff a few years ago.
There's a fantastic book related to the subject called:
Growing Artificial Societies: Social Science from the Bottom Up
The book takes you through various algorithms that can used in a CA
environment to simulate various social behaviours. I even wrote my own
VB program to run some of the simulations. It would be great to convert
this to POV, as then you could create some stunning animations!!
--
Reuben
reu### [at] pearse co uk
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"SeeSchloss" <adr### [at] seeschloss org> escribió en el mensaje
news:413b0f7e@news.povray.org...
> 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 :/
Why don't you do this:
#declare Foo=array[3][3]
{
{1,2,3},
{4,5,6},
{7,8,9}
}
--
- Nicolas Alvarez
nicolas [dot] alvarez [at] gmail [dot] com
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Thu, 09 Sep 2004 21:07:34 -0300, Nicolas Alvarez wrote:
>
>
> "SeeSchloss" <adr### [at] seeschloss org> escribió en el mensaje
> news:413b0f7e@news.povray.org...
>
>> 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 :/
>
> Why don't you do this:
>
> #declare Foo=array[3][3]
> {
> {1,2,3},
> {4,5,6},
> {7,8,9}
> }
Because I didn't want to have something fixed like this. To change the
size of the world with this system you would have had to completely change
the declaration of the array... and directly editing 30x30 arrays like
this isn't really convenient.
This isn't a problem anymore anyway, since the starting values can now be
taken from a picture.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Hi!
The moment I saw this, I knew that I must try to code that myself. So I did. Here is
one of my images. More at
http://home.arcor.de/mad_onion/life/
Post a reply to this message
Attachments:
Download '003-life.jpg' (185 KB)
Preview of image '003-life.jpg'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Manuel Kasten wrote:
> The moment I saw this, I knew that I must try to code that myself. So I did. Here is
one of my images. More at
Also very cool. I need to scrounge the time to build an animation of
Life growing. R-Pentamino, anyone?
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
> Well I posted it, maybe someone else is interested. I've already
> done a program which could probably have been modified to output something
> usable by POV, but I'm not very experienced at parsing external files with
> it... and it was funnier to do it completely with POV :D
In most cases outputting the final SDL as an include-file from your
program is the easiest way to go.
HTH,
Florian
--
Optimum Requirement #1: You are Linus Torvalds
(WEB.DE help-wanted ad: Linux Guru)
[------------ http://www.torfbold.com - POV-Ray gallery ------------]
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Tue, 14 Sep 2004 21:27:26 +0200, "Manuel Kasten" <kas### [at] gmx de>
wrote:
>Hi!
>
>The moment I saw this, I knew that I must try to code that myself. So I did. Here is
one of my images. More at
>http://home.arcor.de/mad_onion/life/
>
>
Woa. Offshore drilling rig meets Lego :D
Neat!
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
--------------( oo )--------------
Hi SS,
I was working with CA's longtime ago on POVray. I had the same problems that
you mention. I started to do CA's simulation in 3D and I tried to render
500x500x500 with a text file to remember the array. This strategy was
uncomputable (very too long). Then, I used java directly to produce a
parsable file with the strict minimum for povray. The simulation is done in
Java (fast) and it could be exported to POVray.
Here's some examples;
http://ingallian.design.uqam.ca/goo/VDO/gPov00.avi
http://ingallian.design.uqam.ca/goo/VDO/aC3D-Stack.mpg
http://ingallian.design.uqam.ca/goo/VDO/aC-XVID.avi
--------------( oo )--------------
guillaumeLaBelle [alias goo?] - Architecture CAAO Website[VIF]-514.524.3010
http://ingallian.design.uqam.ca/goo/indexB.htm
Post a reply to this message
Attachments:
Download 'aC153.jpg' (164 KB)
Download 'aC037.jpg' (213 KB)
Preview of image 'aC153.jpg'

Preview of image 'aC037.jpg'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Fri, 17 Sep 2004 10:38:04 -0400, -g00t©- wrote:
> Hi SS,
>
> I was working with CA's longtime ago on POVray. I had the same problems
> that you mention. I started to do CA's simulation in 3D and I tried to
> render 500x500x500 with a text file to remember the array. This strategy
> was uncomputable (very too long). Then, I used java directly to produce a
> parsable file with the strict minimum for povray. The simulation is done
> in Java (fast) and it could be exported to POVray.
>
> Here's some examples;
>
> http://ingallian.design.uqam.ca/goo/VDO/gPov00.avi
> http://ingallian.design.uqam.ca/goo/VDO/aC3D-Stack.mpg
> http://ingallian.design.uqam.ca/goo/VDO/aC-XVID.avi
Nice, I just thought I should try to create an include file with an
external program, to see the improvement in parsing time. I modified a bit
the program I made some time ago in D for standard 2D cell automata...
parsing a 50x50x100 world in POVRay took 35s while writing a 500x500x100
include file (289MB !) with my program took 11s (0.037s for a 50x50x10
world and 43s for 500x500x500) :D
But still, it was not as fun as doing everything in POV ;)
And... well SS reminds me of not so funny things, maybe I shouldn't
capitalise the second S...
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
--------------( oo )--------------
Thousand of excuses, SeeSchloss
Sometimes shortkuts (SK) produces undesirable effects. Sorry for the SS, it
was naive, and when I see those two letters together, I don't think to the
SS.
> But still, it was not as fun as doing everything in POV ;)
Some time ago I was more active on PovRAY, but maybe less today. I find
others programming languages more complete and effective. Everything that is
geometry related (Vector override operators - Rotations - Matrix
transformation) miss me a lot. Then, why did you switched to Exclusivly
PovRAY?
Regards,
--------------( oo )--------------
guillaumeLaBelle [alias goo?] -
Architecture CAAO Website[VIF]
"SeeSchloss" <adr### [at] seeschloss org> wrote in message
news:pan### [at] seeschloss org...
> On Fri, 17 Sep 2004 10:38:04 -0400, -g00t©- wrote:
>
> > Hi SS,
> >
> > I was working with CA's longtime ago on POVray. I had the same problems
> > that you mention. I started to do CA's simulation in 3D and I tried to
> > render 500x500x500 with a text file to remember the array. This
strategy
> > was uncomputable (very too long). Then, I used java directly to produce
a
> > parsable file with the strict minimum for povray. The simulation is done
> > in Java (fast) and it could be exported to POVray.
> >
> > Here's some examples;
> >
> > http://ingallian.design.uqam.ca/goo/VDO/gPov00.avi
> > http://ingallian.design.uqam.ca/goo/VDO/aC3D-Stack.mpg
> > http://ingallian.design.uqam.ca/goo/VDO/aC-XVID.avi
>
> Nice, I just thought I should try to create an include file with an
> external program, to see the improvement in parsing time. I modified a bit
> the program I made some time ago in D for standard 2D cell automata...
> parsing a 50x50x100 world in POVRay took 35s while writing a 500x500x100
> include file (289MB !) with my program took 11s (0.037s for a 50x50x10
> world and 43s for 500x500x500) :D
>
> But still, it was not as fun as doing everything in POV ;)
>
> And... well SS reminds me of not so funny things, maybe I shouldn't
> capitalise the second S...
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|
 |