I am writing a program, and I need to know how to find the value on a curve on a given frame. I looked around and found a lot of information about bezier curves, but I only know how to draw them. I cannot seem to figure out how to find the y value for a given x value of the curve (the curve will always be used without overlaping back on itself, like the IPOs in Blender). The problem is that the value of the y componant of the curve is only linked to the x componant by t (a value ranging from 0 to 1 representing the points along the curve.) Since the bezier curve is defined with a third degree polynomial I don’t know how to find a function for t derived from the function for the x componant of the bezier curve to be plugged into the y componant of the bezier curve to find a function who’s curve matches the bezier (and uses the control points), but could return the y value for a given x value.
My head hurts.
Does anyone at least know of the name of a function which would be like this? Or know of how Blender’s IPO curves work? I guess I could download the source code and find it, but I want to be able to understand how exactly this would work. Also, I didn’t just want to take someone else’s code and make it my own. I have never done that before, and I don’t want to start now!