Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 10 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
Apache Commons Math 有一系列很好的算法,特别是“SplineInterpolator”,请参阅API 文档
我们调用 alpha 插值函数的示例来自 Groovy 的 (x)、beta(x):
现在来说一个题外话外推法的例子,因为它很有趣。 这里我们使用与上面相同的数据,但使用二次多项式进行推断。 当然还有适当的课程。 同样,在 Groovy 中:
Apache Commons Math has a nice series of algorithms, in particular "SplineInterpolator", see the API docs
An example in which we call the interpolation functions for alpha(x), beta(x) from Groovy:
And now for an off-topic example for EXTRAPOLATIONS, because it's fun. Here we use the same data as above, but extrapolate using an 2nd-degree polynomial. And the appropriate classes, of course. Again, in Groovy:
我从来没有这样做过,但是快速谷歌搜索显示贝塞尔曲线是在 http://java.sun.com/j2se/1.5.0/docs/api/java/awt/geom/QuadCurve2D.Double.html
然后,您可以从这条曲线中 getPathIterator() ,根据文档的说明,您可以得到“形状边界的坐标”,我想这就是您正在寻找的。
I've never done it, but a quick Google search revealed that Bezier curves are implemented in http://java.sun.com/j2se/1.5.0/docs/api/java/awt/geom/QuadCurve2D.Double.html
Then, you can getPathIterator() from this curve and with that, according to what documentation says, you get the "coordinates of shape boundaries", which, i suppose, is what you are looking for.