ocmath_parametric_interpolate_range

 

Contents

Description

Compute parameter data of parametric interpolate cf. E.T.Y. Lee, Choosing nodes in parametric curve interpolation, Computer-Aided Design 21 (1989), 363-370.

Syntax

int ocmath_parametric_interpolate_range( double * pT, const double * pData, UINT nDataSize, UINT nDimension = 2, int nMethod = PARA_INTERP_RANGE_EUGENE )

Parameters

pT
[output] parameter data, size of nDataSize
pData
[input] source data, with size nDimension by nDataSize
nDataSize
[input] size of each dimension, columns of pData
nDimension
[input] dimension of source data, rows of pData, nDimension >= 2
nMethod
[input] method to compute parameter, default is Eugene Lee's centripetal scheme

Return

Return OE_NOERROR on success, return negtive on failure.

Examples

EX1

void    ocmath_parametric_interpolate_range_ex1()
{
    const int nDataSize = 5;
    vector vT(nDataSize);
    matrix mData = {{0, 1, -1, 0, 3},{0, 2, 3, 1, 0}};
    if(ocmath_parametric_interpolate_range(vT, mData, nDataSize) != OE_NOERROR)
    {
        out_str("error in calculating range");
        return;
    }
    
    for(int ii = 0; ii < nDataSize; ii++)
    {
        printf("%f\t", vT[ii]);
    }
}

Remark

See Also

ocmath_parametric_interpolate_eval

header to Include

origin.h

Reference