(**************************** DERIVATIVES *******************************) TYPE RealNeighborhood = ARRAY [-1..+1] OF ARRAY [-1..+1] OF REAL; (* A single-layer 3x3 neighborhood of a texel. *) TYPE StateDerivatives = ARRAY [0..State.N-1] OF RealDerivatives; (* The six partial derivatives of order 0..2 at some texel of a texture. *) RealDerivatives = ARRAY [0..5] OF REAL; (* Partial derivatives for one layer of the texture: in order, $f, f_{x}, f_{y}, f_{xx}, f_{xy}, f_{yy}$. *) PROCEDURE DerivativesFromNeighborhood( READONLY t: RealNeighborhood; VAR v: RealDerivatives; ); (* Computes the six spatial derivatives "v[s]" of order 0..2 from a 3x3 neighborhood "t[y,x]", for a single layer of a texture. *)