Interpreting Complex Solutions in Cubic Bezier Curve Problems

  • Context: Graduate 
  • Thread starter Thread starter treddie
  • Start date Start date
  • Tags Tags
    Cubic Curve
Click For Summary

Discussion Overview

The discussion revolves around the challenges of interpreting complex solutions when solving for y-values along a cubic Bezier curve, particularly when the Bezier curve does not maintain a consistent direction in x. Participants explore the implications of encountering complex roots in the context of a problem that typically expects real scalar outputs.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant describes a program that finds y-values for given x-values along a cubic Bezier curve and notes that the solutions can yield complex results, complicating the interpretation of these values.
  • Another participant requests more details about the approach, mentioning the standard form of a plane curve and suggesting that the inability to find solutions is not surprising.
  • A different participant asserts that if a cubic equation has all real coefficients, it should always have at least one real root, challenging the notion of obtaining three complex roots.
  • One participant acknowledges that while they typically find at least one real solution, they must test all roots when control points change, raising questions about the occurrence of multiple real roots.
  • Another participant expresses frustration at having to resort to numerical methods instead of analytical solutions, suggesting that the nature of Bezier curves, which can cross back over themselves, complicates the assumptions made in finding analytical solutions.

Areas of Agreement / Disagreement

Participants generally agree that encountering complex solutions is problematic, but there is no consensus on the implications of these results or the best approach to resolve the issue. Multiple competing views on the nature of the solutions and their interpretations remain present.

Contextual Notes

Participants note that the behavior of Bezier curves can lead to unexpected results in terms of root solutions, particularly when the curves do not adhere to the assumption of a single y-value for each x-value. The discussion highlights the limitations of analytical solutions in this context.

Who May Find This Useful

Individuals interested in computational geometry, computer graphics, or mathematical modeling of curves may find this discussion relevant, particularly those dealing with cubic Bezier curves and their properties.

treddie
Messages
91
Reaction score
2
Hello.

I have a program that, given a value for (x), needs to find the corresponding y-value along a cubic Bezier curve. So long as the Bezier does not switch direction in (x), there is always one, and only one, value of (y) for every value of (x).

In solving for (y), I discovered that the solution was a cubic (not surprising, since the very name of this type of Bezier is "cubic"). Now, my experience with quadratics and what cubics I run into rarely, is that the way to find out which solution to use is to just test it...Most often, one will always work while the others will not, or in some rare cases all of them will work...Assuming that the values are always Real.

At any rate, after testing the program, I found that, indeed, none of the three solutions always offered a Real result. Sometimes all three were Real, sometimes a mix of Real and Complex, other times all Complex. So my conundrum is this: I need a scalar (Real) value for (y), but when I move one of the control points of the Bezier, I run into a majority of cases where the result for (y) is complex, and no solution reliably results in a Real, scalar value for it. Therefore, there is no way to test for which solution to use.

My question is, how am I to interpret a Complex result in this situation? It is a vector with an Imaginary component, when I need a scalar value. Proofing my math results suggests that I have the correct solutions, and whenever a Real value results, that (y) value is always correct. As far as I know, a Complex value may indicate that something is going on in a separate dimension, so I assume that since the Bezier I am using is 2-dimensional, that the Complex result is telling me that there is activity in a third, orthogonal direction. But that makes no sense as far as this Bezier is concerned.

I am stumped. :(

Any guidance would be really helpful.

Many thanks!
 
Physics news on Phys.org
I could use some more detail about what you are doing. Standard form for a plane curve is P=F(t), where P = (x,y), F(t) is a two dimensional cubic defined by control points, and 0≤t≤1. It is not at all surprising that you can't get solutions in some cases.
 
  • Like
Likes   Reactions: 1 person
If you have a cubic equation with all real coefficients, and you got "three complex roots", that is just wrong. There is always one real root, unless coefficient of ##x^3## is 0 and the equation was not really a cubic.

Find the bug in the code, and try again!
 
  • Like
Likes   Reactions: 1 person
Yes you are correct. I went back and plugged more values into my MathCAD solution and I always come up with at least one real solution. But it can jump from solution to solution. So in that respect, I'll need to test all three on every control point change. But what to do when you have three reel roots? Should it even happen?
 
mathman> I think you are correct. This is the first time I have ever run into the problem where one root does not suffice for all cases in a particular problem. I have instead, resorted to an approximating numerical method which works fine. Bummer, since I always like analytical solutions over numerical ones.

I'm not sure but I think the problem has its source in that a Bezier curve is never limited to not crossing back over itself in (x). Since a Bezier behaves without such a limit, it is perhaps unreasonable to assume that a general analytical solution COULD be limited in that fashion, since it cannot address a local region of a Bezier where there is always one (y) for every (x). That is not the global, general behavior of a Bezier, so the analytical solution will not behave that way either, without some special modifications, whatever those might be, if they even exist.
 
Last edited:

Similar threads

  • · Replies 39 ·
2
Replies
39
Views
5K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 13 ·
Replies
13
Views
6K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 0 ·
Replies
0
Views
3K