new icn messageflickr-free-ic3d pan white
New Feature: Random Seed Synchronization | by Syntopia
Back to photostream

New Feature: Random Seed Synchronization

I've added a new feature to Structure Synth: the random seed can now be reset inside a rule. The command for this is: 'set seed initial'.

 

Now every rule call branch maintains its own sequence of random numbers. This makes it possible to generate the same set of random numbers as used earlier, by resetting the random number seed at some point.

 

In the example above, when the line branches the system is rotated, scaled to half size and the seed is reset. This way we will get exactly the same structure in a smaller scale. So it is a way to achieve self-similarity for stochastic systems.

 

I think this could lead to some very interesting structures. This will be part of Structure Synth 1.0 when released.

 

EisenScript code.

  

spawn

 

rule spawn {

set seed initial

r1

}

 

rule r1 w 0.4 {

{ x 1 } r1

box

}

 

rule r1 w 0.01 {

 

}

 

rule r1 w 0.1 {

{ x 1 ry 90 } r1

box

}

 

rule r1 w 0.1 {

{ x 1 ry -90 } r1

box

}

 

rule r1 w 0.01 {

r1

{ rz 90 s 0.5 hue 120 } spawn

}

    

3,904 views
3 faves
2 comments
Uploaded on February 11, 2009