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 CS418 Lab 12

CS 418: Laboratory 12

Procedural Textures

Introduction.

In this lab you will investigate texture generation by Fourier methods, cellular automata (CA), and partial differential equations.


Procedure:

Download:


Fourier Transform Textures

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:


Cellular Automaton Textures

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:


Reaction/Diffusion Textures

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.

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.

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.

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.


Assignment:

Execute the programs to understand their behavior, then modify them as follows:


Be prepared to demo the modified programs to show:
  • The percolation CA
  • The 3D CA
  • The 1D CA
  • The reaction/diffusion program modified to include a CA.

    Some results from 1996.

    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.


    Back to Main Page


    Last modified, 11/7/95, B. Land.
    Copyright Statement