21 #ifndef PARAMETRICCURVES_H_
22 #define PARAMETRICCURVES_H_
26 #include <tulip/Coord.h>
36 TLP_GL_SCOPE
void buildPascalTriangle(
unsigned int n, std::vector<std::vector<double> > &pascalTriangle);
45 TLP_GL_SCOPE Coord computeBezierPoint(
const std::vector<Coord> &controlPoints,
const float t);
53 TLP_GL_SCOPE
void computeBezierPoints(
const std::vector<Coord> &controlPoints, std::vector<Coord> &curvePoints,
const unsigned int nbCurvePoints = 100);
69 TLP_GL_SCOPE Coord computeCatmullRomPoint(
const std::vector<Coord> &controlPoints,
const float t,
const bool closedCurve =
false,
const float alpha = 0.5);
79 TLP_GL_SCOPE
void computeCatmullRomPoints(
const std::vector<Coord> &controlPoints, std::vector<Coord> &curvePoints,
const bool closedCurve =
false,
const unsigned int nbCurvePoints = 100,
const float alpha = 0.5);
95 TLP_GL_SCOPE Coord computeOpenUniformBsplinePoint(
const std::vector<Coord> &controlPoints,
const float t,
const unsigned int curveDegree = 3);
104 TLP_GL_SCOPE
void computeOpenUniformBsplinePoints(
const std::vector<Coord> &controlPoints, std::vector<Coord> &curvePoints,
const unsigned int curveDegree = 3,
const unsigned int nbCurvePoints = 100);