## Chemotaxis Simulation

Note: The applet below may take up to two minutes to load.

If your browser exhibits "ghosting" and multiple painting, simply minimize and then maximize your browser window (or vice versa).

### Potential Types

• exponential: Potential(r) = Ae-ar + Be-br
where A is the attractant amplitude, a is the attractant decay, B is the repellent amplitude and b is the repellent decay.

• inverse powers: Potential(r) = Ar-a + Br-b
where A is the attractant amplitude, a is the attractant decay, B is the repellent amplitude and b is the repellent decay.

• To compare the attractant vs repellent profiles, click on the Compare Attractant-Repellent button.

### Extra instructions

• Click on any point in the display to see how many cells are there and what are the values of the potentials there. This is called a probe.

• Changing parameter values can only be done in a stopped state.

• Pressing the Show 3D Potential Data produces a window with the current background potentials. The first two columns give the location and the third column gives the potential. The last block of numbers which begins with "0" in the first two columns gives the data for the cells (the value in the third column is the number of cells).

### Data Manipulation (Producing 3D plots)

• Using gnuplot to transform the 3D data into a surface plot:
1. Select the desired display potential (attractant, repellent, combined).
2. Push the Show 3D Potential Data button.
3. Copy the data from the window up to the last block of numbers which have "0" in the first two columns and store it in a file called data.
4. Place the file surf.gp in the same directory as data. (Note: you can edit this file to produce different output. Currently, it is set to display in an Xwindow environment.)
5. Execute gnuplot and give the command load 'surf.gp'.

• Using MATLAB to transform the 3D data:
1. Select the desired display potential (attractant, repellent, combined).
2. Push the Show 3D Potential Data button.
3. Copy the all the data from the window (using your system's cut and paste functions) and store it in a file called data.
4. To see a surface plot, first download the file surfdata.m into the same directory as the data file. Envoke MATLAB such that the working directory is the same as all your data. Give the command surfdata.
5. To see a contour plot, first download the file contdata.m into the same directory as the data file. Envoke MATLAB such that the working directory is the same as all your data. Give the command contdata.

• Calculating average closest neighbor distance:
1. Push the Show 3D Potential Data button.
2. Copy the data from the window beginning with the last block of numbers which have "0" in the first two columns into a file. (If you already have done this to see a surface plot in matlab, simply edit the data file so that only the last block of numbers appears.)