[NKS Architecture - searching building design space] - A New Kind of Science: The NKS Forum

A New Kind of Science: The NKS Forum

Pages:1



NKS Architecture - searching building design space

(Click here to view the original thread with full colors/images)



Posted by: Jason Cawley

The time history of various 2D cellular automaton can create interesting 3 D structures, as already illustrated in NKS p. 172 and p. 180. Slight changes to the standard CA set up allow one to tune the resulting shapes in straightforward, readily implimented ways. Mathematica's existing graphics capabilities then allow one to rapidly look at a wide range of 3 D structures, searching for aesthetically pleasing building forms.

The attached notebook illustrates the idea. The rest of this post contains the "introduction" section of the notebook, and the basic Mathematica function definitions needed.

The minor modification to the basic CA set up is based on the interactive CA idea, which is an instance of a "machine with input". ICAs "compose" two or more CA rules, applying a rule from their allowed set at each step, based on a global "switch". The sequence of these global bits forms an "interaction condition", akin to an initial condition. The underlying array is then transformed at each step by the particular CA rule specified by the global bit for that specific step. In the simplest case, a sequence of 0s and 1s tells the ICA whether to apply its first CA rule or its second.

I use outer totalistic (OT) 2D CA rules, and compose each of them with the "identity" rule, which leaves the pattern unchanged at that step. This effectively elongates the structure "as is" when the interaction condition feeds in a "0", while letting it develop according to the main CA rule when the interaction condition feeds in a "1". For 5 neighbor OT rules, the identity rule is number 682. For 9 neighbor OT rules, identity is rule number 174762. Note also that rules with odd rule numbers do not leave a white background unchanged, but alterate on successive steps. For this use of CAs, those are not helpful, so I restrict myself to even numbered rules.

Then one can break the interaction condition down into segments, for example giving a structure a "top", "middle", and "base". The portion of the interaction condition specifying that portion of the structure can then be "tuned" - e.g. all 1s to let the pattern grow for a "top piece", all 0s to preserve the resulting shape through a "tower", growing again at the base. Or an alternating sequence can be used to slow the maximum rate of "spread" of the structure, in one or more of the above sections.

There are many parameters for the resulting procedure. The interaction condition can be changed, the initial "seed" at the top of the structure can be changed (e.g. from a single cell to a line of cells), and the underlying CA rule can be changed. Each will produce a different design, with a change in underlying rule having the largest effect, and small changes in the interaction condition having the smallest effect. If you don't like the last step or two, you trim off the last element(s) of the interaction condition. If a given section looks like it should be higher, you insert a few extra zeros in the interaction condition at the appropriate place.

Here is the basic code for 2D, outer totalistic ICAs - also contained in the initialization section of the attached notebook.


OT5step[rulelist_, array_, choice_] :=
     Last[CellularAutomaton[{rulelist[[choice + 1]], {
    2, {{0, 2, 0}, {2, 1, 2}, {0, 2, 0}}}, {1, 1}}, array, 1]]

OT5evolve[rulelist_, init_, interact_] := 
    FoldList[OT5step[rulelist, #1, #2] &, init, interact]

OT9step[rulelist_, array_, choice_] :=
     Last[CellularAutomaton[{rulelist[[choice + 1]], {
    2, {{2, 2, 2}, {2, 1, 2}, {2, 2, 2}}}, {1, 1}}, array, 1]]

OT9evolve[rulelist_, init_, interact_] := 
    FoldList[OT9step[rulelist, #1, #2] &, init, interact]


To display the results you will want -


displayCA3D[array_] := 
    Show[Graphics3D[Map[Cuboid[-Reverse[#]] &, Position[array, 1]]]]


Setting parameter values you might have e.g. -


start = ReplacePart[Table[0, {20}, {20}], 1, {10, 10}];
toppiece = Table[1, {3}]; middle = Flatten[Table[{0, 0, 0, 0}, {2}]];   base = Flatten[Table[{1, 1, 0}, {2}]];
inter = Flatten[{toppiece, middle, base}]


Then the actual function call to produce your sample building would just be -


displayCA3D[OT5evolve[{682, 942}, start, inter]]


Many more examples can be found in the attached notebook.

I hope this is interesting.



Posted by: Jason Cawley

For those without Mathematica, here is a jpg screenshot of a sample "NKS building", from the notebook above.



Posted by: McQuinn

Jason,

Can you output from Mathematica a 3D format file of one of your favorite CA building designs and post it here? OBJ or DXF would do fine. I'd like to work with it in my 3D modeling program.

SMcQ



Posted by: McQuinn

I paged through NKS looking for patterns that seemed obviously amenable to building and landscape design. Here is the beginning of a list:

P70: Laid out horizontally, this would make a wonderful mural for a long walkway, such as an airport concourse.

P80: (h) reminds me of Frank Lloyd Wright’s mile-high prairie skyscraper design.

P75, 81 The compressed versions would make interesting multi-story buildings where buttes are common, with the peculiar property that strata form cliffs on one side and talus slopes on the other side.

P91: (h) This would make a pleasant garden pattern for an edge or fringe area.

P127: Possible substitute for the cut and polished stone used for wall facings. I like the irregularity of the quasi triangles.

P132: Envision this sieve of Eratosthenes as a stained glass window for an airport terminal.

More later.

SMcQ



Posted by: McQuinn

p172, 180: Modular construction would seem to be the logical candidate for designs inspired by 3D CA.

p183: Borg Homeworld, for those who like that look.

p214: Discontinuous floor/ceiling tile patterns would be fun to walk over or under.

p229: I see in this the way students cut across a grassy quad, wearing paths of most frequent transit. It would make an interesting stepping-stone pattern, minus the regularity.

p263: (bottom) What an impressive pyramid face, better than the Luxor in Vegas, where tantalizing patterns amidst the randomness would appeal to gamblers.

More later.

SMcQ



Posted by: Jesse Nochella

Following McQuinn's theme here, I can imagine that any reversible CAs would be quite a trip to see muraled over some long wall or walkway.

I often find 1d reversible CAs easier to comprehend and manipulate mentally if I just turn the page sideways and look at the output horizontally. Perhaps that intuitive asthetic preference can be used to advantage in any long stretch of architecture.



Posted by: McQuinn

Yes, Jesse's previous post of a rule 110 output would make a very interesting horizontal mural. Long murals could be examined at a consistent scale along their entire length, whereas perspective would always be a problem if they were posed vertically.

To examine GIF exports from NKSX, I use Irfanview, a free image viewer, which allows rotation of the image and horizontal scrolling, plus magnification of selected areas within the bounds of the window. These would be nice features to have in NKSX 1.1.

SMcQ



Posted by: McQuinn

p278-280: Crop circles with actual computational meaning. It would be funny.

p312: A bit of a stretch on this one, but I'm envisioning several walking paths in an arboretum, starting from the entrance at the top. The tree plantings, corresponding to the pegs, needn't be regular. It would be clever of the paths could be relocated from time to time.

P402: Automata trees, provocative replacement for traditionally drawn landscape elements in sketch renderings.

p532: I'm quite taken with this as having potential for non-uniform domes and non-periodic space-spanning structures. I love Bucky Fuller, but let's pay him homage by taking tensile structure ideas even further.

End of this list.

SMcQ



Posted by: Jason Cawley

Just a technical point about rotating images, zooming, and the like. In Mathematica 5.1, you can just grab a graphic - including 3D images - with a mouse click and rotate it. Zooming can be accomplished using "PlotRange" to selection only a portion of the whole graphic - which works inside graphics objects as well numerical plots. You can also control lighting (specifying the exact location of light sources relative to the image), surface shading, and opacity of an image (drop opacity to zero and those buildings become line drawings of the cude edges only, for example). Of course you can also construct an object out of any primitives you like - one could e.g. substitute spheres for the cuboids in my NKS buildings - use any color function, etc. You don't need to know how to use any such options to get striking looking designs with the attached notebook, but Mathematica will repay just about any additional degree of effort you want to put into tweaking and polishing the results.



Posted by: Guy Birkin

I have been exploring ways of representing CA evolution using non-computer-based media. Lately, I've used ceramic mosaic tiles - like smaller scaled versions of Jesse's suggestion - and needlepoint ('tapestry') with images from 1D CAs. Also, I plan to build models of a 2D CAs using Lego bricks, and have been trying unsuccessfully to visualise the results using Mathematica 5.0, which I'm still getting to grips with.
What I'm trying to get is basically the unadulterated versions of the buildings, but I can't seem to extract only the relevant parts of the Mathematica programs in the notebook.
Could someone put me out of my misery and tell me the code for this, please? I know it's pretty basic, but I'm a Mathematica novice.
Attached is an image of the kind of thing I'm aiming for. The actual Lego piece will show 32 steps starting from one cell and will require 17,044 1x1 bricks.



Posted by: Guy Birkin

Sorry. Hopefully it'll attach this time...
I used MLCAD virtual Lego software to build and POVRAY to render this image, but I'd like to be able to do similar with Mathematica (which can generate the results without me building by hand).



Posted by: Lawrence J. Thaden

Guy,

Here is some sample code.

The symbol plotvalues is an array of heights. You can find ready explanations for ViewPoint and LightSources in the Help menu under Find Selected Function.

ListPlot3D[plotvalues, ViewPoint -> {1.2, 1.2,
1.2}, Lighting -> True, LightSources -> {{{1.3, -2.4, 2.},
RGBColor[1, 0, 0]}, {{2.7, -0.1,
2.}, RGBColor[0, 1, 0]}, {{+2.3, -1.4, 2.}, RGBColor[0, 0, 1]}}, Axes ->
False, Boxed -> False, Mesh -> False];



Posted by: Guy Birkin

Thanks Lawrence,
That's certainly useful. But what I was mainly after was the bit before that stage.
I know from the NKS notes that the mechanism for OT9 2D CAs is:

CAStep[rule_, a_] := Map[rule〚18 - #〛 &,
ListConvolve[{{2, 2, 2}, {2, 1, 2}, {2, 2, 2}}, a, 2], {2}]

And to display the evolution in 3D:

Graphics3D[Map[Cuboid[-Reverse[#]] &, Position[a, 1]]]

But I'm afraid I don't yet know enough about Mathematica to cobble these two bits together successfully.

I'd also like to be able to create these sorts of block CA images using Mathematica (see attached).



Posted by: Jason Wesley Ellis

I think that CA's would also make some interesting fountains.





Forum Sponsored by Wolfram Research

© 2004-2008 Wolfram Research, Inc. | Powered by vBulletin 2.3.0 © 2000-2002 Jelsoft Enterprises, Ltd. | Disclaimer
vB Easy Archive Final - Created by Xenon and modified/released by SkuZZy from the Job Openings