لینک کوتاه : https://en.magicfile.ir/?p=2395
دانلود سورس و کد برنامه درون یابی خطی با ویژوال بیسیک دات نت (BezierSplines Cubic Splines vb.net)
Today, in this post, for you, dear users, we have prepared a source and code for a linear interpolation program with Visual Basic.NET ready for download.
This software is designed to support the algorithm calculation of x-y value curve positions, so that you can easily get any desired point in that drawn curve by drawing a BezierSpline with GDI+ (calling Graphics.DrawCurve(Points)).
A Bezier-Splines curve (brown), made by 7 support points, which divide the BezierSplines into 6 Bezier-Segments. 19 structure points that model the curve (orange). A "pointer curve" (red). It can be moved along the BezierSplines and its location is displayed, calculated by interpolating the BezierSplines.
BezierSplines چگونه ساخته می شود
هر بخش بین دو نقطه تکیه گاه به صورت BezierCurve با 4 نقطه ساخت ساخته می شود:
The two support points themselves and two additional points, which make sure that the Bezier degree that reaches the support point is the same as the Bezier degree. , which leaves the support point.
حالا آن را درون یابی کنید
برای بدست آوردن مقدار Y یک موقعیت X، BezierSplines را در دو مرحله درون یابی می کنم:
First, I search for the Bezier-Segment that contains the X position. This is quickly done by a binary search:
کاهش
درون یابی Bezier-Spline-Segments به عنوان یک Y = f(X)تابع - از نظر ریاضی نادرست است.
Although I keep the support points in "left to right" order, a segment can form where it represents more than one Y value at certain X positions.
My "append" ignores such cases and simply returns the first Y-Value.
The failure allows itself to be seen by some parts of the curve, which cannot be reached by interpolation.
از نظر ریاضی درست است که CubicSplines را درون یابی کنیم.
They are mathematically undefined only if two support points lie on the same X position (as a vertical line).
چند ضلعی، اسپلاین مکعبی
While the interpolation of polygons is trivial, the same is - ahem - trivial in CubicSplines. There is no GDI+ - function that will draw it for you, so you have to deal with linear algebra to solve systems of linear equations - brrr! - I have done this without real understanding.