PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ interpolate_point4d()

void interpolate_point4d ( const POINT4D A,
const POINT4D B,
POINT4D I,
double  F 
)

Find interpolation point I between point A and point B so that the len(AI) == len(AB)*F and I falls on AB segment.

Example:

F=0.5 : A-—I-—B F=1 : A------—B==I F=0 : A==I------—B F=.2 : A-I----—B

Definition at line 646 of file lwgeom_api.c.

647 {
648  assert(F >= 0 && F <= 1);
649  I->x=A->x+((B->x-A->x)*F);
650  I->y=A->y+((B->y-A->y)*F);
651  I->z=A->z+((B->z-A->z)*F);
652  I->m=A->m+((B->m-A->m)*F);
653 }
double m
Definition: liblwgeom.h:414
double x
Definition: liblwgeom.h:414
double z
Definition: liblwgeom.h:414
double y
Definition: liblwgeom.h:414

References POINT4D::m, POINT4D::x, POINT4D::y, and POINT4D::z.

Referenced by lwline_interpolate_point_3d(), lwline_interpolate_points(), and ptarray_substring().

Here is the caller graph for this function: