1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

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

  1. Jan 15, 2008 #1
    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: May 3, 2017
  2. jcsd
  3. Jan 17, 2008 #2


    User Avatar
    Homework Helper

    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.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook