|
1 | 1 | require 'jruby_art'
|
2 | 2 | require 'toxiclibs'
|
3 | 3 |
|
4 |
| -class GrayScottToneMap < Processing::App |
| 4 | +# |
| 5 | +# <p>GrayScottToneMap shows how to use the ColorGradient & ToneMap classes of the |
| 6 | +# colorutils package to create a tone map for rendering the results of |
| 7 | +# the Gray-Scott reaction-diffusion.</p> |
| 8 | +# |
| 9 | +# <p><strong>Usage:</strong><ul> |
| 10 | +# <li>click + drag mouse to draw dots used as simulation seed</li> |
| 11 | +# <li>press any key to reset</li> |
| 12 | +# </ul></p> |
| 13 | +# |
| 14 | +# Copyright (c) 2010 Karsten Schmidt, JRubyArt Version (c) 2015 Martin Prout |
| 15 | +# Easily modified to run with ruby-processing. |
| 16 | +# |
| 17 | +# This demo & library is free software you can redistribute it and/or |
| 18 | +# modify it under the terms of the GNU Lesser General Public |
| 19 | +# License as published by the Free Software Foundation either |
| 20 | +# version 2.1 of the License, or (at your option) any later version. |
| 21 | +# |
| 22 | +# http://creativecommons.org/licenses/LGPL/2.1/ |
| 23 | +# |
| 24 | +# This library is distributed in the hope that it will be useful, |
| 25 | +# but WITHOUT ANY WARRANTY without even the implied warranty of |
| 26 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 27 | +# Lesser General Public License for more details. |
| 28 | +# |
| 29 | +# You should have received a copy of the GNU Lesser General Public |
| 30 | +# License along with this library if not, write to the Free Software |
| 31 | +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 32 | +# |
5 | 33 |
|
6 |
| - # |
7 |
| - # <p>GrayScottToneMap shows how to use the ColorGradient & ToneMap classes of the |
8 |
| - # colorutils package to create a tone map for rendering the results of |
9 |
| - # the Gray-Scott reaction-diffusion.</p> |
10 |
| - # |
11 |
| - # <p><strong>Usage:</strong><ul> |
12 |
| - # <li>click + drag mouse to draw dots used as simulation seed</li> |
13 |
| - # <li>press any key to reset</li> |
14 |
| - # </ul></p> |
15 |
| - # |
16 |
| - |
17 |
| - # |
18 |
| - # Copyright (c) 2010 Karsten Schmidt |
19 |
| - # |
20 |
| - # This demo & library is free software you can redistribute it and/or |
21 |
| - # modify it under the terms of the GNU Lesser General Public |
22 |
| - # License as published by the Free Software Foundation either |
23 |
| - # version 2.1 of the License, or (at your option) any later version. |
24 |
| - # |
25 |
| - # http://creativecommons.org/licenses/LGPL/2.1/ |
26 |
| - # |
27 |
| - # This library is distributed in the hope that it will be useful, |
28 |
| - # but WITHOUT ANY WARRANTY without even the implied warranty of |
29 |
| - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
30 |
| - # Lesser General Public License for more details. |
31 |
| - # |
32 |
| - # You should have received a copy of the GNU Lesser General Public |
33 |
| - # License along with this library if not, write to the Free Software |
34 |
| - # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
35 |
| - # |
36 |
| - |
37 |
| - NUM_ITERATIONS = 10 |
38 |
| - |
| 34 | +class GrayScottToneMap < Processing::App |
| 35 | + NUM_ITERATIONS = 10 |
39 | 36 | attr_reader :gs, :tone_map
|
40 | 37 |
|
41 | 38 | def setup
|
|
0 commit comments