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 - requires SFCGAL >= 2.3.0.

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

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

-- Create a smooth curve interpolating through 5 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
);