Syntax
[C/C++:]
int gInterpolateData2D(int nopt, float ptint, int npts, GPOINT *points2, int nptout, float *ptout1);
int gInterpolateData3D(int nopt, float ptint, int npts, GPOINT3 *points3, int nptout, float *ptout1, float *ptout2);
[F90:]
integer function gInterpolateData2D(nopt, ptint, npts, points2, nptout, ptout1)
integer function gInterpolateData3D(nopt, ptint, npts, points3, nptout, ptout1, ptout2)
integer, intent(in) :: nopt,npts,nptout
real, intent(in) :: ptint
type (GPOINT),intent(in) :: points2(*)
type (GPOINT3),intent(in) :: points3(*)
real, intent(out) :: ptout1(*),ptout2(*)
Arguments
nopt
Interpolation value data type
|
= GXDATA, |
Date value to be interpreted as X data |
|
= GYDATA, |
Date value to be interpreted as Y data |
|
= GZDATA, |
Date value to be interpreted as Z data |
ptint
Data value to be interpolated
npts
Number of data points in either points2 or points3 arrays
points2,points3
Array of 2D or 3D data points
nptout
Size of output arrays ptout1 (and ptout2)
ptout1, ptout2
Intersection values from interpolation
Description
The functions gInterpolateData2D() and gInterpolateData3D() can be used to interpolate a single value against either a 2D or 3D array of data points. The input data points may be supplied from user supplied data or from GINO's internal points storage facilities enabling interpolation of previously drawn lines, arcs or curves.
Interpolation may be carried out in X, Y or Z (where the 3D function is used) according to the setting of
nopt and value passed in
ptint. The data on which the interpolation takes place is passed in the arrays
points2 or
points3 with
npts specifying the number of points supplied.
As there are no restrictions on the form of the input data, the resulting interpolation may supply zero, one or more intersections and this data is returned in the arrays
ptout1 and
ptout2 (where the 3D function is used). Users should set the size of these arrays using the input argument
nptout, with the actual number of intersections being returned by the function itself. No more than
nptout intersections will be returned however, even though there may be more depending on the supplied data.
Interpolation is carried out using linear interpolation.
See Also
gInterpolateData2D UsagegInterpolateData3D UsagegReturnInternalPoints2D
gReturnInternalPoints3D