public class CubicBezierCurve extends Object
Alternatively, the Bezier control points can be supplied explicitly.
The result is not guaranteed to be valid, since large alpha values may cause self-intersections.
Modifier and Type | Method and Description |
---|---|
static Geometry |
bezierCurve(Geometry geom,
double alpha)
Creates a geometry of linearized Cubic Bezier Curves
defined by the segments of the input and a parameter
controlling how curved the result should be.
|
static Geometry |
bezierCurve(Geometry geom,
double alpha,
double skew)
Creates a geometry of linearized Cubic Bezier Curves
defined by the segments of the input and a parameter
controlling how curved the result should be, with a skew factor
affecting the curve shape at each vertex.
|
static Geometry |
bezierCurve(Geometry geom,
Geometry controlPoints)
Creates a geometry of linearized Cubic Bezier Curves
defined by the segments of the input
and a list (or lists) of control points.
|
Geometry |
getResult()
Gets the computed linearized Bezier curve geometry.
|
public static Geometry bezierCurve(Geometry geom, double alpha)
geom
- the geometry defining the curvealpha
- curvedness parameter (0 is linear, 1 is round, >1 is increasingly curved)public static Geometry bezierCurve(Geometry geom, double alpha, double skew)
geom
- the geometry defining the curvealpha
- curvedness parameter (0 is linear, 1 is round, >1 is increasingly curved)skew
- the skew parameter (0 is none, positive skews towards longer side, negative towards shorterpublic static Geometry bezierCurve(Geometry geom, Geometry controlPoints)
Typically the control point geometry
is a LineString
or MultiLineString
containing an element for each line or ring in the input geometry.
The list of control points for each linear element must contain two
vertices for each segment (and thus 2 * npts - 2
).
geom
- the geometry defining the curvecontrolPoints
- a geometry containing the control point elements.public Geometry getResult()
Copyright © 2022. All rights reserved.