Can y(x) be Calculated from a Cubic Bezier Curve?

  • Thread starter Thread starter tuoni
  • Start date Start date
  • Tags Tags
    Curve
AI Thread Summary
Calculating y as a function of x from a cubic Bezier curve is complex due to the inherent cubic relationship between x and t. While the current method involves stepping through t to find corresponding x and y values, this approach can be inefficient. A direct conversion to the form y = f(x) is not straightforward, especially for non-degenerate curves. For specific applications, such as modeling drag constant curves, exploring alternative methods like cubic splines may yield better results. The discussion highlights the challenges of using Bezier curves for precise data interpolation.
tuoni
Messages
55
Reaction score
0
Is it possible to from a cubic Bezier curve (B) first calculate t as a function of x, and then y as a function of t?

I am currently using:

B(t) = (1-t)^{3} \cdot P_{0} + 3(1-t)^{2} \cdot P_{1} + 3(1-t)^{2} \cdot P_{2} + t^{3}P_{3}

; which works just fine to model several curves I need to use in my calculations, however, I would need to be able to calculate y as a function of x, as opposed to B as a function of t.

Is it possible? Simple rearranging doesn't seem to be possible.
 
Mathematics news on Phys.org
If I understand correctly, you want to convert a cubic bezier to the form y = f(x). I'm curious as to what situation you have that you'd want to do this. The beauty of bezier curves is that they can easily describe complicated shapes that can't readily be done with functions of the form y = f(x).

Conversion could potentially be done, but things get messy real fast since with bezier curves x is in general a cubic function in t. If the curve is a degernate one where x is a linear function of t, the conversion is straightforward.
 
At the moment I have to step through t in small increments until I find the x value I want, and then get the y value. I was just wondering whether there was a quicker and more accurate way of doing this.
 
tuoni said:
At the moment I have to step through t in small increments until I find the x value I want, and then get the y value

Tell us a little more about what you are doing. Maybe there is a different approach.
 
I am using Bezier curves to model drag constant curves.

http://enes.fi/temp/kdrag.png

Previously I divided the curve into smaller segments, then for each segment plotted a regression curve using the power function: ak^b (k is the Mach constant). The regression curves were sometimes poor approximations, so I looked for better alternatives.
 
Last edited by a moderator:
Is data interpolation the ultimate objective? If so, I'd try standard cubic splines.
 
Suppose ,instead of the usual x,y coordinate system with an I basis vector along the x -axis and a corresponding j basis vector along the y-axis we instead have a different pair of basis vectors ,call them e and f along their respective axes. I have seen that this is an important subject in maths My question is what physical applications does such a model apply to? I am asking here because I have devoted quite a lot of time in the past to understanding convectors and the dual...
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Back
Top