I have a class that represents a 2D Nurbs curve
class Nurbs2D {...};
The data members are control points (std::vector of Point2D), knot vector (std::vector of double), weights (std::vector of double), degree(implied based on num of control points and knot vector)
APIs: I am able to construct the curve parameterized between t0 & t1. I am also able to compute a Point2D given a parameter t (t0 <= t <= t1).
Given a parameter ti, I want to estimate the next parameter ti+1, such that distance along the curve from ti to ti+1 is equal to Di (given Di within tolerance dt). Two functions, one to compute length from ti to ti+1 and another to estimate ti+1 given ti, Di and st.
Code in C++ will be really useful. I am looking for speed over accuracy as tuning tolerance dt will bring the results to fit.
Aucun commentaire:
Enregistrer un commentaire