fourierknots/fourier_syn.cpp
void FourierKnot::toCurve(float(*pt2func)(float), const int sampling,
                          Curve<Vector3> *curve) {
  float isampling = 1./(float)sampling, s;
  for (int i=0;i<sampling;++i) {
    s = pt2func((float)i*isampling);
    // Tangent gets normalized in biarc constructor
    curve->append((*this)(s),this->prime(s));
  }
}
/*!
  Function pointer pt2func is used to change the speed of the
  parametrization along the curve. This means, sample the curve
  with sampling points using a speed function given by pt2func.
  Write the result in the already initialized and clean curve.
*/
Function pointer pt2func is used to change the speed of the
parametrization along the curve. This means, sample the curve
with sampling points using a speed function given by pt2func.
Write the result in the already initialized and clean curve.
Function pointer pt2func is used to change the speed of the parametrization along the curve . This means sample the curve with sampling points using a speed function given by pt2func . Write the result in the already initialized and clean curve .
void FourierKnot::toCurve(float(*pt2func)(float), const int sampling,
                          Curve<Vector3> *curve) {
  float isampling = 1./(float)sampling, s;
  for (int i=0;i<sampling;++i) {
    s = pt2func((float)i*isampling);
    curve->append((*this)(s),this->prime(s));
  }
}
void FourierKnot :: toCurve ( float ( * pt2func ) ( float ) , const int sampling , Curve < Vector3 > * curve ) { float isampling = 1. / ( float ) sampling , s ; for ( int i = 0 ; i < sampling ; ++ i ) { s = pt2func ( ( float ) i * isampling ) ; curve -> append ( ( * this ) ( s ) , this -> prime ( s ) ) ; } }
Function pointer pt2func is used to change the speed of the
parametrization along the curve.
Function pointer pt2func is used to change the speed of the parametrization along the curve .
// Tangent gets normalized in biarc constructor