| ocmath_parametric_interpolate_range  DescriptionCompute 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 nDataSizepData[input] source data, with size nDimension by nDataSizenDataSize[input] size of each dimension, columns of pDatanDimension[input] dimension of source data, rows of pData, nDimension >= 2nMethod[input] method to compute parameter, default is Eugene Lee's centripetal scheme ReturnReturn OE_NOERROR on success, return negtive on failure. ExamplesEX1 
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]);
    }
}
RemarkSee Alsoocmath_parametric_interpolate_eval header to Includeorigin.h Reference |