Bezier curve(again): given Y, solve for X

  • Thread starter abeall
  • Start date
  • #1
21
0
In a http://en.wikipedia.org/wiki/B%C3%A9zier_curve" [Broken] defined by p1, cp1, cp2, p2, is it possible to solve for X when Y is known?

I can't figure out how to determine if the bezier curve intersects Y. I can conclude that the bezier curve does intersect if p1 and p2 are either side of Y. I can conclude that the bezier curve does not intersect if p1, cp1, cp2, and p2 all fall on one side of Y, but in the case that p1 and p2 fall on one side, and one or both cp1 and cp2 fall on the other side of Y, I don't know, it may or may not intersect. Additionally, it may intersect 1, 2, or 3 times.

Beyond that, I don't know how to solve X when Y is know, or even if it is possible.

Thanks for any advice.
 
Last edited by a moderator:

Answers and Replies

  • #2
hotvette
Homework Helper
996
5
I think the situation is really the same as in your other thread - need to solve a cubic. In a cubic bezier, you have:

x = f(t,C_x).........C_x are the control points
y = g(t,C_y)........C_y are the control points

For the given y, you can solve the 2nd equation for t (0-3 solutions possible), then calculate x from the determined t.

In special cases, parametric equations can be combined (e.g. equation of a circle), but in general, it isn't possible because the curves can loop. That's what makes parametric equations so powerful.
 

Related Threads on Bezier curve(again): given Y, solve for X

Replies
11
Views
11K
  • Last Post
Replies
5
Views
5K
  • Last Post
Replies
4
Views
1K
  • Last Post
Replies
6
Views
2K
  • Last Post
Replies
4
Views
19K
  • Last Post
Replies
2
Views
5K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
9
Views
31K
  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
12
Views
10K
Top