CubicInterpolant - Verge3D User Manual - Soft8Soft
Description: Learn how to use CubicInterpolant in your interactive 3D apps made with Verge3D

Interpolant →

# CubicInterpolant

Performs cubic interpolation for the input arrays.

## Code Example

`const interpolant = new v3d.CubicInterpolant( new Float32Array(2), new Float32Array(2), 1, new Float32Array(1) ); interpolant.evaluate(0.5);`

## Constructor

### CubicInterpolant(parameterPositions, sampleValues, sampleSize, resultBuffer)

- parameterPositions — array of positions.
- sampleValues — array of samples.
- sampleSize — number of samples.
- resultBuffer — buffer to store the interpolation results.

## Properties

### # .parameterPositions : Array

Array of positions.

### # .resultBuffer : Array

Array to store interpolation results.

### # .sampleValues : Array

Array of samples.

### # .settings : Object

Optional, subclass-specific settings structure.

### # .valueSize : Integer

Number of samples.

## Methods

### # .evaluate(t : Float) → Array

Evaluate the interpolant at position `t`.

## Source

For more info on how to obtain the source code of this module see this page.