Basis types¶
SAF_BasisConstants
is a collection of related C preprocessor symbols defined in SAFbasis.h.
Synopsis:
SAF_UNITY
: The basis set with a single basis vector; {1}
SAF_CARTESIAN
: The basis set with N basis vectors; {e0
, e1
, …, eN}
SAF_SPHERICAL
: The basis set with 3 basis vectors {r, theta, phi}
SAF_CYLINDRICAL
: The basis set with 3 basis vectors {r, theta, h}
SAF_UPPERTRI
: The basis set of a symmetric tensor. Why do we need this if
the algebraic type already captures it?
SAF_VARIYING
: For a basis that is varying over the base space. Often needed
if the basis is derived from local surface behavior such as
surface normals. Although, shouldn’t we use something like
SAF__SURFACE_NORMAL
for that?
SAF_ANY_BASIS
: Wildcard for searching.
Description: For every field, not just coordinate fields, SAF needs to be told what are the basis vectors for identifying the field’s values. For example, if we have a field of N pairs of floats representing complex numbers, do those floats represent the real and imaginary part of the complex number (e.g. cartesian basis) or do they represent the magnitude and phase (e.g. the polar basis).
Likewise, if we have N triples representing color of each pixel in image are they RGB
triples, LUV
triples,
YIQ
triples, etc.? The basis type is designed to indicate what the basis vectors for a given field are.
See Also:
- Datatypes: Introduction for current chapter