Click or drag to resize

GdiExtensionMethodsShortenBezierSegment Method

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

Namespace: Altaxo.Graph.Gdi
Assembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public static Tuple<PointF, PointF, PointF, PointF> ShortenBezierSegment(
	PointF P1,
	PointF P2,
	PointF P3,
	PointF P4,
	float t0,
	float t1
)

Parameters

P1  PointF
Control point p1 of the bezier segment.
P2  PointF
Control point p2 of the bezier segment.
P3  PointF
Control point p3 of the bezier segment.
P4  PointF
Control point p4 of the bezier segment.
t0  Single
Value in the range 0..1 to indicate the shortening at the beginning of the segment.
t1  Single
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

TuplePointF, PointF, PointF, PointF
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