Convert polynomial curve to Bezier Curve control points

心不动则不痛 提交于 2019-12-25 14:34:09

问题


How do I compute the control points given a curve in the form of power form? Say I have p(t)=(x(t),y(t)) and 4 control points.

x(t) = 2t 
y(t) = (t^3)+3(t^2)

回答1:


You can always convert from power basis to Bernstein basis. This is always doable and will give you the precise result. Refer to section 3.3 of this link (http://cagd.cs.byu.edu/~557/text/ch3.pdf) for details.

EDIT: Since the above link is no longer available, I am listing the formula below:

where M is the degree of the Berstein basis, 0 <= k <= M and b_i,k=0 if i < k.

Using the common cubic Berstein basis (where M=3) as an example, we will have




回答2:


this is pure math question (unless you go for the #3)... I am deducing you need 4 control points for single cubic Bezier curve in 2D.

  1. algebraic approach

    try to match your x(t),y(t) polynomials to Bezier polynomials form and extract the coefficients/control points. This is not always doable but most precise... see the link in #2 at the end I do this for my interpolation polynomial to match the Bezier so I get the conversion formula between control points.

  2. interpolation

    find extreme points on your curve (to preserve precision as much as possible) if none or not enough extremes found use equally dispersed points along curve for the rest. You need 4 control points on the curve. Now just convert these 4 points to curve for example by this: how to convert interpolation cubic polynmial to cubic Bezier

  3. can use curve fitting

    either use approximation search or any other minimization of curves distance ... by fitting Bezier control points but that is 8 parameters to search for which is slow and non precise without additional constrains ..

I am sure there are a lot more (possibly hybrid) methods out there for this problem.



来源:https://stackoverflow.com/questions/33859199/convert-polynomial-curve-to-bezier-curve-control-points

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!