Module omix.api
Package omix.util.math.curves
Class BezierSectionComputer<T extends AbstractDoubleVec<T>>
java.lang.Object
omix.util.math.curves.CurveSectionComputer<T>
omix.util.math.curves.BezierSectionComputer<T>
- Type Parameters:
T
- Vector type in 2D or 3D coordinates
public class BezierSectionComputer<T extends AbstractDoubleVec<T>> extends CurveSectionComputer<T>
This class represents a Bézier curve section consisting of two (a), three (b) or four (c) control points.
a)
b)
c)
n
point Bézier polynominals.- Author:
- Dr. Peter Droste, Omix Visualization
-
Constructor Summary
Constructors Constructor Description BezierSectionComputer(T[] bezier)
-
Method Summary
Modifier and Type Method Description T
accelerationAt(double t)
returns the acceleration (second derivative) of the curve at the parametert
double
getCurveSectionLength()
returns the curve section lengthT
getPoint(int i)
This method returns the i'th control point.boolean
isCubic()
Returns true if curve section is a cubic curve.boolean
isLine()
Returns true if curve section is a line.boolean
isQuad()
Returns true if curve section is a quad curve.T
pointAt(double t)
returns the point of the curve at the parametert
T
tangentAt(double t)
returns the point of the curve at the parametert
-
Constructor Details
-
Method Details
-
pointAt
returns the point of the curve at the parametert
- Specified by:
pointAt
in classCurveSectionComputer<T extends AbstractDoubleVec<T>>
- Parameters:
t
- parameter- Returns:
- point
- See Also:
CurveSectionComputer.pointAt(double)
-
tangentAt
returns the point of the curve at the parametert
- Specified by:
tangentAt
in classCurveSectionComputer<T extends AbstractDoubleVec<T>>
- Parameters:
t
- parameter- Returns:
- point
- See Also:
CurveSectionComputer.tangentAt(double)
-
accelerationAt
returns the acceleration (second derivative) of the curve at the parametert
- Specified by:
accelerationAt
in classCurveSectionComputer<T extends AbstractDoubleVec<T>>
- Parameters:
t
- parameter- Returns:
- second derivative
- See Also:
CurveSectionComputer.accelerationAt(double)
-
getCurveSectionLength
public double getCurveSectionLength()returns the curve section length- Specified by:
getCurveSectionLength
in classCurveSectionComputer<T extends AbstractDoubleVec<T>>
- Returns:
- length
- See Also:
CurveSectionComputer.getCurveSectionLength()
-
isLine
public boolean isLine()Returns true if curve section is a line. This is the case if the curve has only two control points.- Overrides:
isLine
in classCurveSectionComputer<T extends AbstractDoubleVec<T>>
- Returns:
- line
- See Also:
CurveSectionComputer.isLine()
-
isQuad
public boolean isQuad()Returns true if curve section is a quad curve. This is the case if the curve has three control points.- Overrides:
isQuad
in classCurveSectionComputer<T extends AbstractDoubleVec<T>>
- Returns:
- quad
- See Also:
CurveSectionComputer.isQuad()
-
isCubic
public boolean isCubic()Returns true if curve section is a cubic curve. This is the case if the curve has four control points.- Overrides:
isCubic
in classCurveSectionComputer<T extends AbstractDoubleVec<T>>
- Returns:
- cubic
- See Also:
CurveSectionComputer.isCubic()
-
getPoint
This method returns the i'th control point.- Parameters:
i
- index of the point- Returns:
- i'th control point
-