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 bezier curve 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.
     
  2. jcsd
  3. Jan 17, 2008 #2

    hotvette

    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.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Bezier curve(again): given Y, solve for X
  1. Solve for x, y (Replies: 6)

  2. Bezier curve, y(x) (Replies: 5)

  3. Solve for x,y (Replies: 4)

Loading...