Date: Mon, 16 Dec 1996 22:08:46 GMT Server: NCSA/1.5 Content-type: text/html Last-modified: Thu, 23 May 1996 15:40:20 GMT Content-length: 8547
In this lab you will investigate texture generation by Fourier methods,
cellular automata (CA), and partial differential equations.
Procedure:
Download:
The program FFTtexture.net takes as input an array of points or user defined pixels, then computes the Fourier transform of the points. Since the output of the FFT is complex, the program allows the user to choose either the phase, magnitude, real part or imaginary part, scales the result and displays it.
Transform texture examples:
The program SurfaceTension.net is a CA which simulates the effect of surface tension. Areas tend to get smoother, rounder, and less fragmented. An mpeg animation shows a typical evolution. The rule for this CA is:
The program Reaction.net simulates a chemical reaction coupled to diffusion. There are two reacting chemicals called "red" and "blue". You can think of these as chemically reacting inks. The inks can also spread across the paper at different rates, refered to as their "diffusion constants". Many different behaviors can be simulated by changing the chemical reactions and specific parameters.
One specific reaction scheme described below results in this dynamically changing texture.
To step time:
NewRed concentration = red + 0.2*red*blue - 0.1*red + Dred*Del^2(red)
NewBlue concentration = blue - 0.2*red*blue + 0.1*blue + Dblue*Del^2(blue)
Where Del^2(x) is the sum of the second partial
derivitives of concentration of x with respect to x and y,
as described in the Water wave section of the
dynamics description.
Red diffusion constant: Dred=0.03
Blue diffusion constant: Dblue=0.1
Red initial concentration is random with maximum of 0.5.
Blue initial concentration is the Letters "Test Diff" in a polygon font.
In DX, the second derivitive operators are calculated using the Filter module.
Another example uses the same reaction kinetics as above, but the initial condition is blue dots.
Execute the programs to understand their behavior, then modify them as follows:
Below is an example of a percolation cluster using a stroke font as an initial condition. The threshold probability for each cell was set to 0.3 for the first three time steps. then changed to 0.65. An mpeg animation of the cluster growth shows its evolution.
If sum==0 newState=0
If sum==1 newState=1
If sum==2 newState=1
If sum==3 newState=0
If sum==3 newState=1
If sum==2 newState=oldstate
If sum<2 newState=0
If sum>3 newState=0
The CA should be coupled back into the reaction/diffusion equations as a source term for blue or for red with an interactor to control the strength of each source. So for each cell, there needs to be a term in the NewRed and NewBlue equations of the form
strength * CA
Where CA is the value (1/0) of the automaton cell. Use text as initial conditions. Make an MPEG animation of your favorite reaction/CA texture resulting from this process.
One example shows this process with a CA source strength of 0.05 for blue and 0.0 for red, and using text as an initial condition for the CA. Another example shows a process with a CA source strength of 0.1 for blue and 0.05 for red, and using two strips as an initial condition for the CA. For both of these examples, the reaction equations were the same as above, except that
Red diffusion constant: Dred=0.05
Blue diffusion constant: Dblue=0.2
You should be able to explain your programs. You should use transmitters/receivers, macros, and comments in the "Notation" field of each module so that you and the grader can understand the program. Control panels, if any, should be well organized, labeled, and with the appropriate numeric ranges.
The Lab 12 grading guide will be filled out by a consultant during section to evaluate your work.