Rational Bezier Curve to Polynomial Bezier Curve Conversion?

Your Name] In summary, the conversation discusses the conversion of rational bezier curves to polynomial ones with minimal loss in accuracy. The individual has already tried searching for pre-existing algorithms but has not found any usable results. They are currently experimenting with their own algorithm, which involves setting the rational curve equal to an arbitrary polynomial curve and solving for the control points. They are also looking for a generalized version of this algorithm and considering a brute force approach as an alternative. They are interested in converting a polynomial cubic bezier curve to a rational one with equal weights and applying projective transformations before converting it back into a series of polynomial curves. Expert advice recommends considering the degree of the resulting polynomial curve, using a numerical solver, and referencing resources such as books and
  • #1
ChaosMageX
1
0
Is there a way to convert a rational bezier curve to a piecewise series of one or more polynomial bezier curves with minimal loss in accuracy, specially cubic ones? I've already tried searching the internet for pre-existing algorithms, but I haven't been able to find any usable results despite trying several different keyword combinations. I finally decided to inquire about it here, and hopefully someone else here knows of one or more algorithms that can convert a rational bezier curve to a polynomial one.

So far I've been experimenting with my own algorithm that follows these steps, and I want to know if I'm on the right track, since I haven't yet succeeded in getting it to work (mostly due to the large amount of math involved and figuring out how to generalize it):
1) Set rational curve equal to an arbitrary polynomial curve of a degree >= the degree of the rational curve.
2) Multiply both sides by the denominator of the rational curve.
3) Elevate the degree of the numerator of the rational curve to match the degree of the denominator X the arbitrary polynomial curve.
4) Solve for the values of the control points of the arbitrary polynomial curve.
5) If the polynomial curve doesn't accurately map to the rational curve, create a new arbitrary polynomial curve of a higher degree than the current one and repeat the procedure.

If anyone knows of a generalized version of this algorithm with equations relating the control points of the polynomial curve to the control points and weights of the rational curve, could you please give me a link to the web page or publication with those equations? I thank you for doing so.

If the above algorithm doesn't work, my other option would be a brute force algorithm of calculating the tangents at arbitrary points along the rational bezier curve and using those tangents to divide it into a piecewise series of cubic polynomial bezier curves such that the accuracy and numerical stability of the curves falls within predefined thresholds. Does anyone know of web pages or publications discussing this brute force technique, specifically the division into cubic polynomial bezier curves for graphics applications?

I'm primarily interested in doing this in order to convert a polynomial cubic bezier curve to a rational cubic bezier curve with all weights equal to one, apply projective transformations to it, and then convert the transformed rational cubic bezier curve back into a series of one or more piecewise polynomial cubic bezier curves to be drawn by computer graphics APIs.

If the initial algorithm does work, I'd then have to find an additional numerically stable algorithm to reduce the degree of the resulting polynomial bezier curve to three by dividing it into a piecewise series of cubic polynomial bezier curves. Ultimately it might be better just to cut to the chase and use the brute force algorithm of dividing the rational bezier curve into a piecewise series of cubic polynomial bezier curves.

Still, at this point, I'd really like to know if the algorithm I've outlined the steps to above would actually work before moving away from it if a faster and more efficient algorithm exists.
 
Last edited:
Physics news on Phys.org
  • #2


Hello,

Thank you for your inquiry. As a scientist with expertise in computer graphics, I would like to provide some insights on your question.

Firstly, I want to assure you that you are on the right track with your algorithm. The steps you have outlined are commonly used in converting rational bezier curves to polynomial ones. However, there are a few things to keep in mind while implementing this algorithm.

1) The degree of the resulting polynomial curve may not always be the same as the degree of the rational curve. In some cases, it may be higher or lower. Therefore, it is important to have a mechanism in place to handle these scenarios.

2) The accuracy of the resulting polynomial curve depends on the degree of the polynomial curve used in step 1. Higher degrees may result in better accuracy, but it also means more computation.

3) It is important to use a numerical solver to solve for the control points of the polynomial curve. This will ensure stability and accuracy in the results.

Now, to answer your question about a generalized version of this algorithm, there are a few sources that provide equations for converting rational bezier curves to polynomial ones. I suggest looking into the following resources:

1) "Curves and Surfaces for Computer Aided Geometric Design" by Gerald Farin
2) "The NURBS Book" by Les Piegl and Wayne Tiller
3) "Geometric Modeling with Splines: An Introduction" by Elaine Cohen and Richard F. Riesenfeld

These books provide detailed explanations and equations for converting rational bezier curves to polynomial ones. Additionally, there are also some online resources available that discuss this topic, such as this one: https://pages.mtu.edu/~shene/COURSES/cs3621/NOTES/spline/Bezier/bezier-sub.html

Regarding your second option of using a brute force algorithm, there are also some resources available that discuss this technique. I suggest looking into "Piecewise Cubic Bezier Curves" by Steven J. Gortler, which provides a detailed explanation of the brute force approach.

In conclusion, I would suggest continuing with your current algorithm, but also considering the points I have mentioned. Additionally, I recommend looking into the resources I have mentioned for more detailed explanations and equations. I hope this helps and good luck with your project.
 

FAQ: Rational Bezier Curve to Polynomial Bezier Curve Conversion?

1. What is a Rational Bezier Curve?

A Rational Bezier Curve is a mathematical curve commonly used in computer graphics and animation. It is defined by a set of control points and weight values, which determine its shape and curvature.

2. What is a Polynomial Bezier Curve?

A Polynomial Bezier Curve is a type of Bezier curve that is defined by a set of control points without weight values. It is a simpler form of the Rational Bezier Curve and is commonly used in 2D and 3D graphics.

3. Why would you want to convert a Rational Bezier Curve to a Polynomial Bezier Curve?

Converting from a Rational Bezier Curve to a Polynomial Bezier Curve can be useful for simplifying calculations and reducing computational complexity. It can also make the curve more compatible with certain applications and algorithms.

4. How do you convert a Rational Bezier Curve to a Polynomial Bezier Curve?

To convert a Rational Bezier Curve to a Polynomial Bezier Curve, you can use a mathematical formula that involves dividing each control point by its corresponding weight value. This will result in a set of control points that can be used to define a Polynomial Bezier Curve.

5. Are there any limitations or drawbacks to converting a Rational Bezier Curve to a Polynomial Bezier Curve?

One limitation of converting to a Polynomial Bezier Curve is that the resulting curve may not be able to represent certain shapes or curves as accurately as the original Rational Bezier Curve. Additionally, the conversion process may introduce rounding errors or loss of precision.

Similar threads

Replies
3
Views
1K
Replies
2
Views
2K
Replies
8
Views
4K
Replies
6
Views
3K
Replies
1
Views
3K
Replies
1
Views
2K
Replies
2
Views
5K
Replies
3
Views
2K
Back
Top