iphone - Drawing a bezier from multiple points -
I have 50 sets in x with a set with y. I have to attract all the points, or in other words, the sly Bezier who passes through Bezier, which will be the best fit points.
How can I do this? Thanks
I am going through a similar problem in 3D. This is a bit easier in 2D because the lines are not always related to parallel.
First of all, reading on quadratic beijier loans represent each curve with three digits, the line will not cross the middle point. Thus, your middle point can not be one of those points that you need to fit Trying, or it will not go through it.
Instead, the beginning and end point of your quadratic beak curve should be two consecutive digits. If you want to pass it, what will be your middle point?
One way to solve it (never tried it yourself, it may not look right, but I am thinking over the top of my head) Calculating tangents is your -1th data Point the point to your 0th data point, and find the difference between that point of data and the second data point. Then draw the line between the 0th data point and draw 1 data point as the middle bezier curve value through this point.
Obviously, you may have trouble at the end of the curve, for which some inventive thinking may be needed, they look good (the first point is not a -1th point).
Sorry about the lack of diagrams. I'll be one, but I'm on an iPad.
Comments
Post a Comment