algorithmic modeling for Rhino
A cellular automaton consists of a regular grid of cells, each in one of a finite number of states, "On" and "Off" for example. The grid can be in any finite number of dimensions. For each cell, a set of cells called its neighborhood (usually including the cell itself) is defined relative to the specified cell. For example, the neighborhood of a cell might be defined as the set of cells a distance of 2 or less from the cell. An initial state (time t=0) is selected by assigning a state for each cell. A new generation is created (advancing t by 1), according to some fixed rule (generally, a mathematical function) that determines the new state of each cell in terms of the current state of the cell and the states of the cells in its neighborhood.
Check wikipedia for full details and examples.
Conway Game of Life Implemented in Grasshopper and RhinoScript
Comment
Hi Lorenzo,
I updated the post with new code... This should help.
Hello Rajaa, it seems that I might need your help again ;)
we're trying to set up a 2D CA, but instead of using square grid, using the distorted grid coming from PTools. (the question of yesterday).
How could we set it up?
Thanks
And one more question.
What is the meaning of State(j)??
Is it the quantity of Points?
hello , Rajaa Issa, i found some question about your CA script .
How does it create rows ? Why is the yNum must be smaller than xNum?
and i feel it should go like this.
'Create rows
For i = 0 To State.Count() - 1 Step xNum
y = 0
For j = i To i + xNum - 1
Dim st As Integer
st = State(j)
SGrid(x, y) = st
y = y + 1
Next
x = x + 1
Next
is it the problem of the original script you wrote? or it is the problem after i modified it.
thank you
hello, i am new to the vbscript.
i had a question about the revised script, because i'm trying to modified the script you upload to fit my rules(http://www.grasshopper3d.com/forum/topics/vb-code-problem)
but i figure out that the result point with start to became blank every YNum that i set
example: if my YNum set to 25
then the result of the point will start become blank for 14 points after the 25th point in the grid, and repeating the pattern.
Attached is a revised version of the Game of Life in grasshopper. It fixes a bug where the new state is saved on top of the old state and it causes following cells to be incorrectly evaluated. thanks to Leming for pointing this out.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by
You need to be a member of Grasshopper to add comments!