Click or drag to resize

BezierCurveFlattenerFlattenBezierSegment Method

Recursively flattens a single cubic Bezier segment by subdividing it until flatness criteria are met.

Namespace: Altaxo.Geometry
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3448.0 (4.8.3448.0)
Syntax
C#
public bool FlattenBezierSegment(
	int recursionLevel,
	PointD2D p0_0,
	PointD2D p1_0,
	PointD2D p2_0,
	PointD2D p3_0,
	List<PointD2D> flattenedList,
	int insertIdx
)

Parameters

recursionLevel  Int32
Current recursion depth (limited internally).
p0_0  PointD2D
Segment start point.
p1_0  PointD2D
First control point.
p2_0  PointD2D
Second control point.
p3_0  PointD2D
Segment end point.
flattenedList  ListPointD2D
Target list to insert subdivision points.
insertIdx  Int32
Insertion index for the newly computed midpoint.

Return Value

Boolean
True if the segment was subdivided (i.e., not flat enough), false if it already met the flatness criteria.
See Also