public final class Bezier extends Object
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Modifier and Type | Method and Description |
---|---|
static OTSLine3D |
bezier(int numPoints,
OTSPoint3D... points)
Construct a Bézier curve of degree n.
|
static OTSLine3D |
bezier(OTSPoint3D... points)
Construct a Bézier curve of degree n.
|
static OTSLine3D |
cubic(nl.tudelft.simulation.language.d3.DirectedPoint start,
nl.tudelft.simulation.language.d3.DirectedPoint end)
Construct a cubic Bézier curve from start to end with two generated control points at half the distance between
start and end.
|
static OTSLine3D |
cubic(int numPoints,
nl.tudelft.simulation.language.d3.DirectedPoint start,
nl.tudelft.simulation.language.d3.DirectedPoint end)
Construct a cubic Bézier curve from start to end with two generated control points at half the distance between
start and end.
|
static OTSLine3D |
cubic(int numPoints,
OTSPoint3D start,
OTSPoint3D control1,
OTSPoint3D control2,
OTSPoint3D end)
Construct a cubic Bézier curve from start to end with two control points.
|
static void |
main(String[] args) |
public static OTSLine3D cubic(int numPoints, OTSPoint3D start, OTSPoint3D control1, OTSPoint3D control2, OTSPoint3D end) throws OTSGeometryException
numPoints
- the number of points for the Bézier curvestart
- the start point of the Bézier curvecontrol1
- the first control pointcontrol2
- the second control pointend
- the end point of the Bézier curveOTSGeometryException
- in case the number of points is less than 2 or the Bézier curve could not be
constructedpublic static OTSLine3D cubic(int numPoints, nl.tudelft.simulation.language.d3.DirectedPoint start, nl.tudelft.simulation.language.d3.DirectedPoint end) throws OTSGeometryException
numPoints
- the number of points for the Bézier curvestart
- the directed start point of the Bézier curveend
- the directed end point of the Bézier curveOTSGeometryException
- in case the number of points is less than 2 or the Bézier curve could not be
constructedpublic static OTSLine3D cubic(nl.tudelft.simulation.language.d3.DirectedPoint start, nl.tudelft.simulation.language.d3.DirectedPoint end) throws OTSGeometryException
start
- the directed start point of the Bézier curveend
- the directed end point of the Bézier curveOTSGeometryException
- in case the number of points is less than 2 or the Bézier curve could not be
constructedpublic static OTSLine3D bezier(int numPoints, OTSPoint3D... points) throws OTSGeometryException
numPoints
- the number of points for the Bézier curve to be constructedpoints
- the points of the curve, where the first and last are begin and end point, and the intermediate ones are
control points. There should be at least two points.OTSGeometryException
- in case the number of points is less than 2 or the Bézier curve could not be
constructedpublic static OTSLine3D bezier(OTSPoint3D... points) throws OTSGeometryException
points
- the points of the curve, where the first and last are begin and end point, and the intermediate ones are
control points. There should be at least two points.OTSGeometryException
- in case the number of points is less than 2 or the Bézier curve could not be
constructedpublic static void main(String[] args) throws OTSGeometryException
args
- argsOTSGeometryException
- neCopyright © 2014–2016 Delft University of Technology. All rights reserved.