Specification

CellDataStruct

double[] at - The variable keeping track of the sampling position. It can be a vector of two or three dimensions, meaning that it has two or three values. Usually the values in at are changed continously to create an animation or a structured surface.

double[] F - This array, having length defined in the constructor by the argument max_order, contains the distance to the nearest feature points.

double[][] delta - This array has the same length as F, but it contains arrays representing the vector pointing to the nearest feature points. This practically is a matrix of max_order by dimensions size.

CellDataStruct(PApplet parent, int max_order, double[] at, int dist_type) - The constructor of the data structure. Used initially to create and define the noise pattern. Takes four arguments. First the parent applet, wich is probably the main Processing class reffered to as this. Second the number of feature points to search for. One to three feature points are reasonably fast, and more than 10 is probably a mistake. The third argument is the sample position and the fourth is the distance measure type. (See below for a list of distance measures.)

CellNoise

final int EUCLIDEAN, CITYBLOCK, MANHATTAN, QUADRATIC - These are the available distance measures. EUCLIDEAN is the default case.

CellNoise(PApplet parent) - Initiate the CellNoise class using this function. It takes only one atgument, the parent Applet, and needs only to be run once to create a noise generator.

void noise(CellDataStruct cd) - Call this function to generate noise. It takes as argument the data structure, set with the sample position in cd.at. It then calculates the values according to the position and the settings made at the data structure initialization (max_order, dist_type).

log in administrator | design: c & s