21 #ifndef PARAMETRICCURVES_H_ 22 #define PARAMETRICCURVES_H_ 26 #include <tulip/tulipconf.h> 27 #include <tulip/Coord.h> 39 TLP_SCOPE
void buildPascalTriangle(
unsigned int n,
40 std::vector<std::vector<double>> &pascalTriangle);
49 TLP_SCOPE Coord computeBezierPoint(
const std::vector<Coord> &controlPoints,
const float t);
57 TLP_SCOPE
void computeBezierPoints(
const std::vector<Coord> &controlPoints,
58 std::vector<Coord> &curvePoints,
59 const unsigned int nbCurvePoints = 100);
79 TLP_SCOPE Coord computeCatmullRomPoint(
const std::vector<Coord> &controlPoints,
const float t,
80 const bool closedCurve =
false,
const float alpha = 0.5);
93 TLP_SCOPE
void computeCatmullRomPoints(
const std::vector<Coord> &controlPoints,
94 std::vector<Coord> &curvePoints,
95 const bool closedCurve =
false,
96 const unsigned int nbCurvePoints = 100,
97 const float alpha = 0.5);
114 TLP_SCOPE Coord computeOpenUniformBsplinePoint(
const std::vector<Coord> &controlPoints,
115 const float t,
const unsigned int curveDegree = 3);
124 TLP_SCOPE
void computeOpenUniformBsplinePoints(
const std::vector<Coord> &controlPoints,
125 std::vector<Coord> &curvePoints,
126 const unsigned int curveDegree = 3,
127 const unsigned int nbCurvePoints = 100);