Package-level declarations

Types

Link copied to clipboard
data class BoundaryEigenMode(val eigenvalue: Double, val frequencyRatio: Double, val contour: RectifiedContour, val ts: List<Double>, val values: DoubleArray)

One eigenmode of a RectifiedContour's outline, as produced by RectifiedContour.extractBoundaryEigenModes.

Link copied to clipboard
data class EigenMode(val eigenvalue: Double, val frequencyRatio: Double, val bounds: Rectangle, val width: Int, val height: Int, val values: DoubleArray)

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

Link copied to clipboard

Which condition the vibrational eigenmode problem imposes at the domain's boundary. See Shape.extractEigenModes.

Functions

Link copied to clipboard
fun RectifiedContour.extractBoundaryEigenModes(count: Int, resolution: Int = 128, random: Random = Random(0)): List<BoundaryEigenMode>

Extracts the count lowest-frequency eigenmodes of this rectified contour's outline, ignoring its interior entirely -- the boundary-only counterpart to Shape.extractEigenModes. resolution parameters equidistant in rectified (arc-length) space are treated as a cycle graph, and its graph-Laplacian eigenvectors extracted; see org.openrndr.extra.math.eigenmodes.extractCycleEigenModes. A RectifiedContour is required rather than a plain ShapeContour specifically so that equal steps in t are equal steps in arc length -- true by construction here, since ts[i] = i / resolution in rectified space -- which is what the cycle graph's uniform edge weights assume.

Link copied to clipboard
fun Shape.extractEigenModes(count: Int, resolution: Int = 64, random: Random = Random(0), boundaryCondition: EigenModeBoundaryCondition = EigenModeBoundaryCondition.DIRICHLET): List<EigenMode>

Extracts the count lowest-frequency vibrational eigenmodes of this shape's interior, by rasterizing it to a grid and solving the discrete clamped- or free-membrane eigenproblem on it.