Colin's Blog
Recent content on Colin's Blog
马上订阅 Colin's Blog RSS 更新: https://blog.oyyko.com/index.xml
Mogan_note4
finalwind42@gmail.com (Oyyko)
2023年9月3日 20:33
如何画曲线
1public: 2 inline curve_rep () {} 3 inline virtual ~curve_rep () {} 4 5 inline virtual int nr_components () { return 1; } 6 // the number of components of the curve is useful for getting 7 // nice parameterizations when concatenating curves 8 9 virtual point evaluate (double t)= 0;10 // gives a point on the curve for its intrinsic parameterization11 // curves are parameterized from 0.0 to 1.01213 array<point> rectify (double eps);14 // returns a rectification of the curve, which, modulo reparameterization15 // has a uniform distance of at most 'eps' to the original curve1617 virtual void rectify_cumul (array<point>& a, double eps)= 0;18 // add rectification of the curve (except for the starting point)19 // to an existing polysegment2021 /*22 NOTE: more routines should be added later so that one23 can reliably compute the intersections between curves24 One might for instance take the following:25 */26 virtual double bound (double t, double eps)= 0;27 // return delta such that |t' - t| < delta => |c(t') - c(t)| < eps.2829 virtual point grad (double t, bool& error)=...剩余内容已隐藏
查看完整文章以阅读更多
Colin's Blog
Recent content on Colin's Blog
马上订阅 Colin's Blog RSS 更新: https://blog.oyyko.com/index.xml
Mogan_note4
finalwind42@gmail.com (Oyyko)
2023年9月3日 20:33
如何画曲线
1public: 2 inline curve_rep () {} 3 inline virtual ~curve_rep () {} 4 5 inline virtual int nr_components () { return 1; } 6 // the number of components of the curve is useful for getting 7 // nice parameterizations when concatenating curves 8 9 virtual point evaluate (double t)= 0;10 // gives a point on the curve for its intrinsic parameterization11 // curves are parameterized from 0.0 to 1.01213 array<point> rectify (double eps);14 // returns a rectification of the curve, which, modulo reparameterization15 // has a uniform distance of at most 'eps' to the original curve1617 virtual void rectify_cumul (array<point>& a, double eps)= 0;18 // add rectification of the curve (except for the starting point)19 // to an existing polysegment2021 /*22 NOTE: more routines should be added later so that one23 can reliably compute the intersections between curves24 One might for instance take the following:25 */26 virtual double bound (double t, double eps)= 0;27 // return delta such that |t' - t| < delta => |c(t') - c(t)| < eps.2829 virtual point grad (double t, bool& error)=...剩余内容已隐藏
查看完整文章以阅读更多