Posts: 292
Threads: 31
Joined: Apr 2003
I read about a simple program that you can make in just a few minutes. It's pretty cool, so try it:
Use a screen mode w/ high res and PSET a single pixel on the top row.
Have a loop that goes through pixel by pixel. The pixel is either colored or left blank based on the binary sequence of the pixels above it. For example, you could have it go so if the 3 pixels above it were 1, 0, 1, then that it becomes on.
The 3 pixels have 2 ^ 3 = 8 combinations you need to take care of.
If you randomize the different combinations that either turn the pixel on or off, different designs are created, including some fractals.
Try it!
Posts: 1,166
Threads: 62
Joined: Apr 2003
Got an example for us? I'm kind of confused.
am an asshole. Get used to it.
Posts: 594
Threads: 11
Joined: Oct 2002
Posts: 1,080
Threads: 87
Joined: Feb 2002
I think he's talking about "the life simulation",
each pixel is dead or alive depending on in
wich states the eight pixels around it is...
/post]
Posts: 3,368
Threads: 195
Joined: Jan 2003
Yeah.
You count up the number of pixels around each pixel, and then apply the rules.
Watch out for borders.
EDIT:
I just realized the topic's initial poster meant the pyramid format not the map format.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."
Visit www.neobasic.net to see rubbish in all its finest.
Posts: 358
Threads: 15
Joined: May 2003
Quote:I read about a simple program that you can make in just a few minutes. It's pretty cool, so try it:
Use a screen mode w/ high res and PSET a single pixel on the top row.
Have a loop that goes through pixel by pixel. The pixel is either colored or left blank based on the binary sequence of the pixels above it. For example, you could have it go so if the 3 pixels above it were 1, 0, 1, then that it becomes on.
The 3 pixels have 2 ^ 3 = 8 combinations you need to take care of.
If you randomize the different combinations that either turn the pixel on or off, different designs are created, including some fractals.
Try it!
I wrote a program to display the 1-D automata you are talking about. It's located here:
http://www.tcdn.teiher.gr/upload/downloa...fileid=644
This program will allow the user to specify the width of the automata, and the rule used to update at each step. Thi initial condition can be changed within the code.
Posts: 358
Threads: 15
Joined: May 2003
Quote:I read about a simple program that you can make in just a few minutes. It's pretty cool, so try it:
Use a screen mode w/ high res and PSET a single pixel on the top row.
Code:
SCREEN 11
DEFINT A-Z
CLS
PSET (320, 1)
FOR y = 2 TO 480
FOR x = 1 TO 630
PSET (x, y), (POINT(x - 1, y - 1) XOR (POINT(x, y - 1) OR POINT(x + 1, y - 1)))
NEXT x
NEXT y
Try this...
Posts: 292
Threads: 31
Joined: Apr 2003
Um... I already made the program - not asking for help. But thanks anyway.
For those of you who don't know what I'm talking about, I'll try to post a few screen shots as soon as I find the time.
Posts: 115
Threads: 6
Joined: Feb 2003
Heh mango try changing that OR to a XOR makes a neat triangle pattern thingy
very F***ing song remains the same
To everyone who sucks-up for the fame
Out of strength you know we speak the truth
Every trend that dies is living proof
MasterMinds Software
Posts: 358
Threads: 15
Joined: May 2003
Quote:Heh mango try changing that OR to a XOR makes a neat triangle pattern thingy
:-) Really??!!! ;-)
after a many-year break in programming, I read Wolffam's "A new kind of science" and started programming in QB...the only language I know. Here's code to allow you to explore ALL the 1D cellular automata. Just type a number for the rule...
http://www.tcdn.teiher.gr/upload/downloa...fileid=644
I was just showing how easy it was to get nice output from a small amount of code. The automata you 'discovered' by replacing xor with or is one of the "non-interesting" nesting patterns. Pattern 30 or 110, are more interesting, because they are less predictable.
Cheers!!! I'm glad you liked the pattern!...BTW...Wolfram is the guy responsible for Mathmatica software...in case anyone reading this is not up to speed on this topic...
BTW2...about your RND generator...after 500k cycles, it stops filling the screen...yet the screen is not yet filled...on my machine...do you have different results?