Skip to content

Commit

Permalink
Added Dan Wills' patterns to CMakeLists.txt and Help/changes.html. Fi…
Browse files Browse the repository at this point in the history
…xed usual float/double issue for intolerant OpenCL drivers.
  • Loading branch information
timhutton committed Aug 9, 2015
1 parent 22b8dca commit 2de213e
Show file tree
Hide file tree
Showing 7 changed files with 185 additions and 172 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ set( PATTERN_FILES
Patterns/Experiments/DanWills/orbits_explodey_init.vti
Patterns/Experiments/DanWills/orbits_sharpWaves-init.vti
Patterns/Experiments/DanWills/grayscott-historyWave_coralGrow.vti
Patterns/Experiments/DanWills/grayscott-historyWaveDC_movingWormsAndSolitons.vti
Patterns/Experiments/DanWills/orbitsNova_buildAndDestroyBlobs.vti
Patterns/Experiments/DanWills/orbits_epochs.vti
Patterns/Experiments/DanWills/grayscott-historyWaveDC_dualPhaseSolitonWormFlow.vti
Patterns/Experiments/DanWills/heat-equation-boiling-history-wave_glidersUnstable.vti
Patterns/Experiments/SimonGladman/vermiformSolitons.vti
Patterns/Experiments/TimHutton/LifeBlur.vti
Patterns/Experiments/CornusAmmonis/MandelbrotWorms.vti
Expand Down
1 change: 1 addition & 0 deletions Help/changes.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ <h3>Changes</h3>
<li><a href="open:Patterns/SmoothLife2011/gaussian-smoothlife.vti">gaussian-smoothlife.vti</a> - a variant of Stephan Rafler's SmoothLife system with neighborhoods computed with 2-pass 1D gaussian convolution.
<li><a href="open:Patterns/McCabe2010/fast-mccabe.vti">fast-mccabe.vti</a> - McCabeism implemented with 2-pass 1D gaussian convolution.
<li>From Dave Mann: <a href="open:Patterns/Experiments/DaveMann/smiley_faces.vti">smiley_faces.vti</a>.
<li>Five new patterns from Dan Wills: <a href="open:Patterns/Experiments/DanWills/grayscott-historyWaveDC_movingWormsAndSolitons.vti">grayscott-historyWaveDC_movingWormsAndSolitons.vti</a>, <a href="open:Patterns/Experiments/DanWills/orbitsNova_buildAndDestroyBlobs.vti">orbitsNova_buildAndDestroyBlobs.vti</a>, <a href="open:Patterns/Experiments/DanWills/orbits_epochs.vti">orbits_epochs.vti</a>, <a href="open:Patterns/Experiments/DanWills/grayscott-historyWaveDC_dualPhaseSolitonWormFlow.vti">grayscott-historyWaveDC_dualPhaseSolitonWormFlow.vti</a>, <a href="open:Patterns/Experiments/DanWills/heat-equation-boiling-history-wave_glidersUnstable.vti">heat-equation-boiling-history-wave_glidersUnstable.vti</a>.
</ul>
<li>Fix for blank lines being inserted into files on every save.
<li>Fix for font size problems with the color bar.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
<VTKFile type="ImageData" version="0.1" byte_order="LittleEndian" compressor="vtkZLibDataCompressor">
<RD format_version="4">
<description>
A gray-scott reaction-diffusion system is simulated in the a and b reagents, with two coupled simpler systems in c,d,e.
The c reagent implements a diffuse kind of &apos;history&apos; of the other reagents (ie so that gliders can leave a &apos;trail&apos;).
The d and e reagents implement the wave equation, with additional damping and shaping controls, which is fed by the other reagents (for example gliders can leave a rippley &apos;wake&apos; behind them).
The extra reagents can feed back into the gray-scott ones, and also control the gray-scott parameters (including diffusion).
Implemented by Dan Wills ([email protected]) based on existing work in the Ready codebase.
A Gray-Scott reaction-diffusion system is simulated in the a and b reagents, with two coupled simpler systems in c,d,e.
The c reagent implements a diffuse kind of &apos;history&apos; of the other reagents (ie so that gliders can leave a &apos;trail&apos;).
The d and e reagents implement the wave equation, with additional damping and shaping controls, which is fed by the other reagents (for example gliders can leave a rippley &apos;wake&apos; behind them).
The extra reagents can feed back into the Gray-Scott ones, and also control the Gray-Scott parameters (including diffusion).

Implemented by Dan Wills ([email protected]) based on existing work in the Ready codebase.

This example starts as flowing maze-like growth which *usually* (not always) decays forming a flowing field of worms and solitons. When conditions are right, they switch back to this 'elevated' form of growth, that is both stronger growing and generally more maze-forming. The dynamic behaviour switching has an interesting long-term chaotic effect on the underlying behaviour, which would otherwise tend to end in a constant state or loop.
This example starts as flowing maze-like growth which *usually* (not always) decays forming a flowing field of worms and solitons. When conditions are right, they switch back to this 'elevated' form of growth, that is both stronger growing and generally more maze-forming. The dynamic behaviour switching has an interesting long-term chaotic effect on the underlying behaviour, which would otherwise tend to end in a constant state or loop.

There are very rare initial states that end up with the system stuck in the 'elevated' state, and it may stay that way for some time. So, if it looks flowing fingerprints and no dots for ages, you might need to generate a new initial state.
There are very rare initial states that end up with the system stuck in the 'elevated' state, and it may stay that way for some time. So, if it looks flowing fingerprints and no dots for ages, you might need to generate a new initial state.
</description>
<rule name="Gray-Scott" type="formula" wrap="1" neighborhood_type="vertex" neighborhood_range="1" neighborhood_weight="laplacian">
<param name="timestep">
Expand Down Expand Up @@ -122,13 +123,13 @@ There are very rare initial states that end up with the system stuck in the 'ele
0.0056
</param>
<formula number_of_chemicals="5">
delta_a = (D_a + c*c_to_Da + (d-wave_DC_value)*wave_to_Da) * laplacian_a - pow(a,(float4)a_pow)*pow(b,(float4)b_pow) + (F + c_to_F*c + (d-wave_DC_value)*wave_to_F)*(1.0f-a) + c*c_to_a + (d-wave_DC_value)*wave_to_a;
delta_b = (D_b + c*c_to_Db + (d-wave_DC_value)*wave_to_Db) * laplacian_b + pow(a,(float4)a_pow)*pow(b,(float4)b_pow) - ((F + c_to_F*c + (d-wave_DC_value)*wave_to_F)+(k + c*c_to_k + (d-wave_DC_value)*wave_to_k))*b + c*c_to_b + (d-wave_DC_value)*wave_to_b;
delta_c = -c*c_damp + a*a_to_c + b*b_to_c + (d-wave_DC_value)*wave_to_c + D_c * laplacian_c;
c = clamp( pow( (float4)( fabs(c)/c_pow_norm ), (float4)c_pow )*c_pow_norm, c_clamp_min, c_clamp_max );
d = wave_DC_value + clamp( sign(d-wave_DC_value) * pow( (float4)( fabs(d-wave_DC_value) * wave_damp), (float4)wave_power ) + a * a_to_wave + b * b_to_wave + c * c_to_wave, -wave_clamp, wave_clamp);
delta_e = (laplacian_d) * wave_diffusion;
delta_d = e + delta_e;
delta_a = (D_a + c*c_to_Da + (d-wave_DC_value)*wave_to_Da) * laplacian_a - pow(a,(float4)a_pow)*pow(b,(float4)b_pow) + (F + c_to_F*c + (d-wave_DC_value)*wave_to_F)*(1.0f-a) + c*c_to_a + (d-wave_DC_value)*wave_to_a;
delta_b = (D_b + c*c_to_Db + (d-wave_DC_value)*wave_to_Db) * laplacian_b + pow(a,(float4)a_pow)*pow(b,(float4)b_pow) - ((F + c_to_F*c + (d-wave_DC_value)*wave_to_F)+(k + c*c_to_k + (d-wave_DC_value)*wave_to_k))*b + c*c_to_b + (d-wave_DC_value)*wave_to_b;
delta_c = -c*c_damp + a*a_to_c + b*b_to_c + (d-wave_DC_value)*wave_to_c + D_c * laplacian_c;
c = clamp( pow( (float4)( fabs(c)/c_pow_norm ), (float4)c_pow )*c_pow_norm, c_clamp_min, c_clamp_max );
d = wave_DC_value + clamp( sign(d-wave_DC_value) * pow( (float4)( fabs(d-wave_DC_value) * wave_damp), (float4)wave_power ) + a * a_to_wave + b * b_to_wave + c * c_to_wave, -wave_clamp, wave_clamp);
delta_e = (laplacian_d) * wave_diffusion;
delta_d = e + delta_e;
</formula>

</rule>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
<VTKFile type="ImageData" version="0.1" byte_order="LittleEndian" compressor="vtkZLibDataCompressor">
<RD format_version="4">
<description>
A gray-scott reaction-diffusion system is simulated in the a and b reagents, with two coupled simpler systems in c,d,e.
The c reagent implements a diffuse kind of &apos;history&apos; of the other reagents (ie so that gliders can leave a &apos;trail&apos;).
The d and e reagents implement the wave equation, with additional damping and shaping controls, which is fed by the other reagents (for example gliders can leave a rippley &apos;wake&apos; behind them).
The extra reagents can feed back into the gray-scott ones, and also control the gray-scott parameters (including diffusion).
Implemented by Dan Wills ([email protected]) based on earlier work from the Ready codebase.
A Gray-Scott reaction-diffusion system is simulated in the a and b reagents, with two coupled simpler systems in c,d,e.

The c reagent implements a diffuse kind of &apos;history&apos; of the other reagents (ie so that gliders can leave a &apos;trail&apos;).

The d and e reagents implement the wave equation, with additional damping and shaping controls, which is fed by the other reagents (for example gliders can leave a rippley &apos;wake&apos; behind them).

The extra reagents can feed back into the Gray-Scott ones, and also control the Gray-Scott parameters (including diffusion).

Implemented by Dan Wills ([email protected]) based on earlier work from the Ready codebase.
</description>
<rule name="Gray-Scott" type="formula" wrap="1" neighborhood_type="vertex" neighborhood_range="1" neighborhood_weight="laplacian">
<param name="timestep">
Expand Down Expand Up @@ -118,13 +122,13 @@ Implemented by Dan Wills ([email protected]) based on earlier work from the Ready
0
</param>
<formula number_of_chemicals="5">
delta_a = (D_a + c*c_to_Da + (d-wave_DC_value)*wave_to_Da) * laplacian_a - pow(a,(float4)a_pow)*pow(b,(float4)b_pow) + (F + c_to_F*c + (d-wave_DC_value)*wave_to_F)*(1.0f-a) + c*c_to_a + (d-wave_DC_value)*wave_to_a;
delta_b = (D_b + c*c_to_Db + (d-wave_DC_value)*wave_to_Db) * laplacian_b + pow(a,(float4)a_pow)*pow(b,(float4)b_pow) - ((F + c_to_F*c + (d-wave_DC_value)*wave_to_F)+(k + c*c_to_k + (d-wave_DC_value)*wave_to_k))*b + c*c_to_b + (d-wave_DC_value)*wave_to_b;
delta_c = -c*c_damp + a*a_to_c + b*b_to_c + (d-wave_DC_value)*wave_to_c + D_c * laplacian_c;
c = clamp( pow( (float4)( fabs(c)/c_pow_norm ), (float4)c_pow )*c_pow_norm, c_clamp_min, c_clamp_max );
d = wave_DC_value + clamp( sign(d-wave_DC_value) * pow( (float4)( fabs(d-wave_DC_value) * wave_damp), (float4)wave_power ) + a * a_to_wave + b * b_to_wave + c * c_to_wave, -wave_clamp, wave_clamp);
delta_e = (laplacian_d) * wave_diffusion;
delta_d = e + delta_e;
delta_a = (D_a + c*c_to_Da + (d-wave_DC_value)*wave_to_Da) * laplacian_a - pow(a,(float4)a_pow)*pow(b,(float4)b_pow) + (F + c_to_F*c + (d-wave_DC_value)*wave_to_F)*(1.0f-a) + c*c_to_a + (d-wave_DC_value)*wave_to_a;
delta_b = (D_b + c*c_to_Db + (d-wave_DC_value)*wave_to_Db) * laplacian_b + pow(a,(float4)a_pow)*pow(b,(float4)b_pow) - ((F + c_to_F*c + (d-wave_DC_value)*wave_to_F)+(k + c*c_to_k + (d-wave_DC_value)*wave_to_k))*b + c*c_to_b + (d-wave_DC_value)*wave_to_b;
delta_c = -c*c_damp + a*a_to_c + b*b_to_c + (d-wave_DC_value)*wave_to_c + D_c * laplacian_c;
c = clamp( pow( (float4)( fabs(c)/c_pow_norm ), (float4)c_pow )*c_pow_norm, c_clamp_min, c_clamp_max );
d = wave_DC_value + clamp( sign(d-wave_DC_value) * pow( (float4)( fabs(d-wave_DC_value) * wave_damp), (float4)wave_power ) + a * a_to_wave + b * b_to_wave + c * c_to_wave, -wave_clamp, wave_clamp);
delta_e = (laplacian_d) * wave_diffusion;
delta_d = e + delta_e;
</formula>

</rule>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<VTKFile type="ImageData" version="0.1" byte_order="LittleEndian" compressor="vtkZLibDataCompressor">
<RD format_version="3">
<description>
The &lt;a href=&quot;http://en.wikipedia.org/wiki/Heat_equation&quot;&gt;heat equation&lt;/a&gt;, also known as the diffusion equation, describes multiple phenomena including the spreading-out of heat in a solid body and the diffusion of chemicals in a liquid.

This formula adds additional reagents to the Heat Equation that model something akin to 'Boil History' in B and 'Boil Wave/Wake' in C and D. When the boil threshold is exceeded, the boil-event emits value into history and wave, allowing it to leave a diffusing history behind it, as well as a rippling wake.
In this pattern (using the boiling heat formula as described above), moving glider-like wavefronts form against a background of chaotic boil-events. Constant creation and annihlation usually ends up with a particular flow-direction winning out overall, and wider wavefronts can form once this direction is established, which tend to dominate the individual smaller wavefronts.
Written by Dan Wills, (as a bit of an homage-to-CAPOW by Rudy Rucker) based on earlier code in the Ready repo.
The &lt;a href=&quot;http://en.wikipedia.org/wiki/Heat_equation&quot;&gt;heat equation&lt;/a&gt;, also known as the diffusion equation, describes multiple phenomena including the spreading-out of heat in a solid body and the diffusion of chemicals in a liquid.
This formula adds additional reagents to the Heat Equation that model something akin to 'Boil History' in B and 'Boil Wave/Wake' in C and D. When the boil threshold is exceeded, the boil-event emits value into history and wave, allowing it to leave a diffusing history behind it, as well as a rippling wake.
In this pattern (using the boiling heat formula as described above), moving glider-like wavefronts form against a background of chaotic boil-events. Constant creation and annihlation usually ends up with a particular flow-direction winning out overall, and wider wavefronts can form once this direction is established, which tend to dominate the individual smaller wavefronts.
Written by Dan Wills, (as a bit of an homage-to-CAPOW by Rudy Rucker) based on earlier code in the Ready repo.
</description>
<rule name="Heat Equation with History And Wave" type="formula" wrap="1" neighborhood_type="vertex" neighborhood_range="1" neighborhood_weight="laplacian">
<param name="timestep">
Expand Down Expand Up @@ -114,15 +114,15 @@ Written by Dan Wills, (as a bit of an homage-to-CAPOW by Rudy Rucker) based on e
0
</param>
<formula number_of_chemicals="4">
a = clamp( sign(a) * pow( fabs( a + a_boil_rate ), (float4) a_power ) + (c-wave_DC_value)*wave_to_a, (float4) a_clamp_min, (float4) a_clamp_max);
float4 boil = pow( clamp( (float4) ( ((a+laplacian_a * boil_diffusion) - boil_threshold ) * boil_heat_loss ), (float4) 0.0, (float4) 1.0 ), (float4)boil_power );
a = a + ( -a * boil + b * -a * a_boil_history_rate );
delta_a = laplacian_a * (a_diffusion_rate + (c-wave_DC_value)*wave_to_Da) + (c-wave_DC_value)*wave_to_a + b*a_from_b;
delta_b = -b*(b_damp + c*wave_to_b_damp) + a*b_from_a + boil*b_from_boil + (b_diffusion + (c-wave_DC_value)*wave_to_Db) * laplacian_b + (c-wave_DC_value)*wave_to_b;
b = clamp( sign(b) * pow( (float4)( fabs(b)/b_pow_norm ), (float4)b_pow )*b_pow_norm, b_clamp_min, b_clamp_max );
c = wave_DC_value + clamp( sign(c-wave_DC_value) * pow( (float4)( fabs(c-wave_DC_value)/wave_pow_norm * wave_damp ), (float4)wave_power )*wave_pow_norm, -wave_clamp, wave_clamp);
delta_d = (laplacian_c) * wave_diffusion;
delta_c = d + delta_d + a * wave_from_a + b * wave_from_b + boil*wave_from_boil;
a = clamp( sign(a) * pow( fabs( a + a_boil_rate ), (float4) a_power ) + (c-wave_DC_value)*wave_to_a, (float4) a_clamp_min, (float4) a_clamp_max);
float4 boil = pow( clamp( (float4) ( ((a+laplacian_a * boil_diffusion) - boil_threshold ) * boil_heat_loss ), (float4) 0.0f, (float4) 1.0f ), (float4)boil_power );
a = a + ( -a * boil + b * -a * a_boil_history_rate );
delta_a = laplacian_a * (a_diffusion_rate + (c-wave_DC_value)*wave_to_Da) + (c-wave_DC_value)*wave_to_a + b*a_from_b;
delta_b = -b*(b_damp + c*wave_to_b_damp) + a*b_from_a + boil*b_from_boil + (b_diffusion + (c-wave_DC_value)*wave_to_Db) * laplacian_b + (c-wave_DC_value)*wave_to_b;
b = clamp( sign(b) * pow( (float4)( fabs(b)/b_pow_norm ), (float4)b_pow )*b_pow_norm, b_clamp_min, b_clamp_max );
c = wave_DC_value + clamp( sign(c-wave_DC_value) * pow( (float4)( fabs(c-wave_DC_value)/wave_pow_norm * wave_damp ), (float4)wave_power )*wave_pow_norm, -wave_clamp, wave_clamp);
delta_d = (laplacian_c) * wave_diffusion;
delta_c = d + delta_d + a * wave_from_a + b * wave_from_b + boil*wave_from_boil;
</formula>

</rule>
Expand Down
Loading

0 comments on commit 2de213e

Please sign in to comment.