Kedama: A massively-parallel tile-scriptable particle system

Introduction

Kedama is a Japanese word for "fluffy ball", or "wooly ball". The latest version is Kedama 2.7.

1. Get started

2. Get the Kedama world

0.png1.png2.png

3. Get an exemplar of turtles

3.png

4. Wrapping Atoms

4.png

5. Bouncing Atoms

6. Trail

Phrases in a scriptor will be executed in a manner I call "line-wise synchronization." This means that a line will be executed after everything related to the previous line gets completed. For example, in this example in 6.png, "patch diffusePatchVariable" is executed after the everybody in turtle1 breed completes the "patchValueIn:" action.
5.png6.png

7. Epidemic

You can implement a disease infection simulation. Each turtle has a variable called infected, and if a non-infected guy touches an infect guy, it gets infected. Do you notice the common pattern in "setup" and "oneStep"? You can factor them out to one script and call the script from these. Do you think the simulation is too slow? You can increse the tick rate from the menu you get by holding the mouse button on the clock. 50 per second would do it.
7.png8.png9.png

8. Tick rate, diffusion rate, evaporation rate, logarithmic and linear display, and etc.

As I wrote above, the tick rate is vital to make an interesting simulation. Hold the clock button of a ticking script and change the tick rate. Diffusion rate controls how much dissusion happens per tick, and evaporation rate controls how much decaying happens per tick. Internally a slot of the patch is represented as 32-bit unsigned integer. There are two types of displaying. One is logarithmic (default) and another is linear. It is controlled by "useLogDisplay" variable in the viewer of a patch. In logarithmic type, the log value in the patch is used. the strength is relative to the "scaleMax" value. That is, the value of 1 or 0 is displayed as transparent, the value greater or equal to "scaleMax" is displayed as opaque, and the value inbetween are displayed as particular translucency. In the linear mode (useLogDisplay = false), the value in patch is shifted by the "shiftAmount" value and the resulting value is used to represent a alpha value from 0 to 255. You can also "show" and "hide" turtles. Choose command from the turtles viewer.

9. upHill

Turtles can sense the gradient of the patch values. See the "ants" example.

10. Fill the world with turtles

You can "fill" the world with turtles. If you drop a sketch, you get the turtles in the sketch'es pixel pattern. See the "pixel" example.

13. Angle to and distance to

See the "pixel" example and "forest fire" example.

14. TODOs

As of Jan 24th, 2005:

Examples


Contact

Yoshiki Ohshima
Viewpoints Research Institute
1209 Grand Central
Glendale, CA 91201