Click or drag to resize

CardinalSplineToBezierSegmentConverterShortenBezierSegment Method

Shortens a Bezier segment and returns the Bezier points of the shortened segment.

Namespace: Altaxo.Geometry
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public static Tuple<PointD2D, PointD2D, PointD2D, PointD2D> ShortenBezierSegment(
	PointD2D P1,
	PointD2D P2,
	PointD2D P3,
	PointD2D P4,
	double t0,
	double t1
)

Parameters

P1  PointD2D
Control point p1 of the bezier segment.
P2  PointD2D
Control point p2 of the bezier segment.
P3  PointD2D
Control point p3 of the bezier segment.
P4  PointD2D
Control point p4 of the bezier segment.
t0  Double
Value in the range 0..1 to indicate the shortening at the beginning of the segment.
t1  Double
Value in the range 0..1 to indicate the shortening at the beginning of the segment. This value must be greater than t0.

Return Value

TuplePointD2D, PointD2D, PointD2D, PointD2D
The control points of the shortened Bezier segment.
Remarks

See this source http://stackoverflow.com/questions/11703283/cubic-bezier-curve-segment for explanation.

The assumtion here is that the Bezier curve is parametrized using

B(t) = (1−t)³ P1 + 3(1−t)² t P2 + 3(1−t) t² P3 + t³ P4

See Also