Package-level declarations
Types
One eigenmode of n points arranged around a closed curve, as produced by extractCycleEigenModes -- the discrete, boundary-only analogue of GridEigenMode. These are the eigenvectors of the cycle graph Laplacian, i.e. a generalization of the sine/cosine basis used by classical Fourier shape descriptors to a curve sampled at non-uniform detail.
An eigenvalue paired with its eigenvector.
One vibrational eigenmode of a domain rasterized to a width x height grid, as produced by extractEigenModes. Values are zero outside the domain that was passed in.
Functions
Builds the graph Laplacian of an n-node cycle graph (node i connected to i - 1 and i + 1, indices modulo n) -- the discrete analogue of the periodic 1D Laplacian, and the natural graph to put on n points sampled around a closed curve. Symmetric positive semi-definite, with the constant vector as its null (zero-eigenvalue) eigenvector -- see extractCycleEigenModes.
Builds the discrete Dirichlet Laplacian for the interior grid points marked true in mask, a width x height grid stored row-major (index = y * width + x).
Builds the discrete Neumann ("free edge") Laplacian for the interior grid points marked true in mask, a width x height grid stored row-major (index = y * width + x).
Extracts the main diagonal of this sparse matrix.
Extracts the count lowest-frequency eigenmodes of n points arranged around a closed curve, by solving the eigenproblem of the buildCycleLaplacian graph Laplacian -- the boundary-only counterpart to extractEigenModes/extractNeumannEigenModes, which instead act on the curve's interior.
Extracts the count lowest-frequency Dirichlet ("fixed edge") vibrational eigenmodes of the domain marked true in mask, a width x height grid. This is the discrete analogue of solving -Δu = λu on the domain with u = 0 on its boundary -- the same problem that produces Chladni figures on a clamped drum head.
Extracts the count lowest-frequency Neumann ("free edge") vibrational eigenmodes of the domain marked true in mask, a width x height grid. This is the discrete analogue of solving -Δu = λu on the domain with a zero-derivative (reflecting) boundary -- the free-plate counterpart to extractEigenModes's clamped drum head.
Flips the sign of v in place, if needed, so that its largest-magnitude component is positive. Eigenvectors are only defined up to sign; this picks a canonical one so that repeated extraction (across seeds, resolutions, or re-runs) doesn't flip a mode's polarity arbitrarily.
Finds the count smallest eigenpairs of this symmetric positive-semidefinite sparse matrix, using shift-invert Lanczos: builds one Krylov subspace for the operator v -> solve(this, v) (via SparseMatrix.solveCG) -- which maps this matrix's smallest eigenvalues to its largest, the ones Lanczos converges to fastest -- and extracts Ritz pairs from the resulting small, dense tridiagonal eigenproblem.
Solves the symmetric positive-definite system this * x = b using the Jacobi-preconditioned conjugate gradient method.
Multiplies this sparse matrix with a dense vector.