• ### What is your GameDev Story?

#### Archived

This topic is now archived and is closed to further replies.

# bezier spline math

This topic is 5833 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello, may anyone tell me how I can get the corresponding y value from a given x value of an 2D bezier curve. As explanation you find this graph. http://www.Behr-Bros.de/usf/xsi_bezier.jpg There is also the problem how to convert a 3D nurbs curve into a 3D bezier curve. Examples: Nurbs: http://www.Behr-Bros.de/usf/nurbs.jpg Bezier: http://www.Behr-Bros.de/usf/bezier.jpg thx Steffen

##### Share on other sites
Since Bezier curves and NURBS are parametric functions, the x/y values depend on a time step.
So you compute x and y values by x = fx(t) (t ranging 0..1)
and y = fy(t).
There is no y = f(x) and thus no x = f-1(y).

##### Share on other sites
You can use the quadratic formula to find the values, if any, at which the bezier takes on a given value of x. That may be zero, one or two values of t. You can then use that/those value(s) of t to find the corresponding y(s).

##### Share on other sites
quote:
Original post by LilBudyWizer
You can use the quadratic formula to find the values, if any, at which the bezier takes on a given value of x. That may be zero, one or two values of t. You can then use that/those value(s) of t to find the corresponding y(s).

I forgot that there''s not only a direct way

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 11
• 15
• 11
• 11
• 9
• ### Forum Statistics

• Total Topics
634151
• Total Posts
3015817
×

## Important Information

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!