GridEigenMode

data class GridEigenMode(val eigenvalue: Double, val frequencyRatio: Double, val width: Int, val height: Int, val values: DoubleArray)(source)

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.

Constructors

Link copied to clipboard
constructor(eigenvalue: Double, frequencyRatio: Double, width: Int, height: Int, values: DoubleArray)

Properties

Link copied to clipboard

The Laplacian eigenvalue of this mode; larger means higher spatial frequency.

Link copied to clipboard

This mode's frequency relative to the fundamental mode, i.e. sqrt(eigenvalue / fundamentalEigenvalue), mirroring the harmonic ratios (2nd partial, 3rd partial, ...) familiar from vibrating strings/membranes/plates. For a Dirichlet domain the fundamental is mode 0 itself (frequencyRatio == 1.0). For a Neumann domain mode 0 is instead the trivial, patternless zero-eigenvalue constant mode (frequencyRatio == 0.0); the fundamental is mode 1.

Link copied to clipboard
val height: Int

Grid height.

Link copied to clipboard

The mode shape, row-major over the width x height grid.

Link copied to clipboard
val width: Int

Grid width.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun value(x: Double, y: Double): Double

Bilinearly samples this mode at grid coordinates (x, y), where x ranges over 0 until width and y over 0 until height. Positions outside that range are clamped.