I saw this Rule30 in the video.
https://mathworld.wolfram.com/Rule30.html
It must be complicated.
Thanks Experts!
I'm not sure what the animation is supposed to look like but you can do something like this for example using new image, set pixels and ad frame
Or just plot it as Heatmap in GraphBuilder and record it.
another approach - for infinite loops.
with the data table created on the fly ...
dt = New Table( "cellular automaton", New Column( "pos", Nominal ), New Column( "step", Nominal ), New Column( "status", Nominal ) ); dt << add rows( 1 ); :pos[1] = 0; :step[1] = 1; :status[1] = 1; t0 = hptime(); gb = dt << Graph Builder( Show Control Panel( 0 ), Show Title( 0 ), Show X Axis( 0 ), Show X Axis Title( 0 ), Variables( X( :pos ), Y( :step ), Color( :status ) ), Elements( Heatmap( X, Y, Legend( 1 ) ) ), SendToReport( Dispatch( {}, "pos", ScaleBox, {Label Row( Tick Mark Style( "Long Divider" ) )} ), Dispatch( {}, "step", ScaleBox, {Reversed Scale, Label Row( Tick Mark Style( "Long Divider" ) )} ), Dispatch( {}, "400", ScaleBox, {Legend Model( 1, Properties( 1, {Fill Color( 0 )}, Item ID( "1", 1 ) ), Properties( 2, {Fill Color( 2 )}, Item ID( "0", 1 ) ) )} ) ) ); wait(0); cells = [1]; j=4; For( i = 2, i > 0, i++, //i=2 cells = Insert( Insert( cells, 0, 1 ), 0 ); cells0 = Insert( Insert( cells, 0, 1 ), 0 ); cells = Transform Each( {dummy, idx}, cells, //idx=3; myPattern = 100 * cells0[idx] + 10 * cells0[idx + 1] + cells0[idx + 2]; Match( mypattern, 100, 1, 11, 1, 10, 1, 1, 1, 0 // all other variants give 0 ); ); Ncells = N Items( cells ); nr = N Rows( dt ); dt << add rows( 2 * i - 1 ); rows = nr + (1 :: Ncells); dt[rows, "step"] = J( Ncells, 1, i ); dt[rows, "pos"] = ((1 :: Ncells) - i)`; dt[rows, "status"] = cells; if(hptime()-t0>10000,wait(0);t0=hptime()) );
I have to admit: It took me a while to get the Zoom right.
The first idea: restrict the view to rows with Data=1: While the entries are calculated, more and more entries will show up, leading to a zoom-out.
But this approach did not work as expected - see below.
Please notice the Data Filter - it starts with the correct setting: Data=1,
but when the column is cleared and the calculation starts, there is no such data anymore - and the Data Filter just forgets it's settings (!!!).
This bug was first described in Outlier (:alien:) screening with Jmp Dashboards - how? .
- some workarounds can be found here - a wish to fix the bug: Local Data Filter: option: restrict or do not restrict to current data
- a more elegant way to tackle such issues: :folded_hands: Column Property: Inclusive Values