EigenMode

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

One vibrational eigenmode of a Shape's interior, as produced by Shape.extractEigenModes.

This is the discrete analogue of solving -Δu = λu on the shape's interior with either a pinned or a free boundary -- see EigenModeBoundaryCondition.

Constructors

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

Properties

Link copied to clipboard
val bounds: Rectangle

The shape's bounding box that the underlying grid was rasterized into.

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 of a vibrating string/membrane/plate. For EigenModeBoundaryCondition.DIRICHLET the fundamental is mode 0 itself (frequencyRatio == 1.0). For EigenModeBoundaryCondition.NEUMANN, 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 used for rasterization.

Link copied to clipboard

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

Link copied to clipboard
val width: Int

Grid width used for rasterization.

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(position: Vector2): Double

Samples this mode at a world-space position using bilinear interpolation. Positions outside bounds are clamped to its edge.