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

  • Context: Undergrad 
  • Thread starter Thread starter tuoni
  • Start date Start date
  • Tags Tags
    Curve
Click For Summary

Discussion Overview

The discussion revolves around the feasibility of calculating y(x) from a cubic Bezier curve, specifically exploring the conversion of the Bezier representation into a function of x. The context includes technical reasoning and potential applications in modeling curves.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant inquires whether it is possible to derive t as a function of x from a cubic Bezier curve, noting that simple rearranging does not seem feasible.
  • Another participant suggests that converting a cubic Bezier to the form y = f(x) could be complicated, as x is generally a cubic function of t, although a linear case would simplify the conversion.
  • A participant describes their current method of stepping through t in small increments to find corresponding x and y values, expressing a desire for a more efficient approach.
  • Another participant requests additional details about the application to explore alternative methods.
  • A participant mentions using Bezier curves to model drag constant curves and discusses previous challenges with regression curves, indicating a search for better modeling techniques.
  • One participant proposes that if data interpolation is the goal, standard cubic splines might be a suitable alternative.

Areas of Agreement / Disagreement

Participants express varying levels of understanding and approaches to the problem, with no consensus on a definitive method for calculating y(x) from a cubic Bezier curve. Multiple competing views and methods are presented.

Contextual Notes

The discussion highlights limitations in the conversion process, particularly the complexity introduced by the cubic nature of the Bezier curve and the potential for degenerate cases. There are also unresolved aspects regarding the effectiveness of alternative methods proposed.

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.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 18 ·
Replies
18
Views
5K
  • · Replies 11 ·
Replies
11
Views
13K
  • · Replies 33 ·
2
Replies
33
Views
4K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K