Name

CG_NurbsCurveInterpolate — Creates an interpolating NURBS curve passing through all given data points

Synopsis

geometry CG_NurbsCurveInterpolate(geometry data_points, integer degree);

説明

Creates a NURBS curve that interpolates through all provided data points. The resulting curve passes exactly through each point in the input geometry.

Parameters:

  • data_points - A LINESTRING geometry containing the points to interpolate through.

  • degree - Polynomial degree of the NURBS curve (typically 2 or 3).

Availability: 3.7.0 - SFCGAL >= 2.3.0 が必要。

このメソッドにはSFCGALバックエンドが必要です。

この関数は3次元に対応し、Z値を削除しません。

This example creates a smooth curve interpolating through five points.

SELECT CG_NurbsCurveInterpolate(
    'LINESTRING(0 0, 1 2, 3 3, 5 1, 6 0)'::geometry,
    3
);

-- 3D interpolation
SELECT CG_NurbsCurveInterpolate(
    'LINESTRING Z(0 0 0, 1 2 1, 3 3 0, 5 1 -1, 6 0 0)'::geometry,
    2
);