Friday, November 18, 2016

Bezier, data points approximated by a polynomial made in VB6 (B-Spline, C spline, T-Spline)

Automated translation from Italian

The coordinates of the points to be interpolated or approximated may be changed to:
1) selecting, with the mouse cursor, the point to move and dragging it to the desired position.
2) Selecting, in the table, the coordinate to edit and write the new value in the Text box. Clicking an 'other box or by pressing the' Enter to confirm the new value; the Escape key restores the previous value.
3) Import a data file, generated by an 'other application with the menu command "Curve / Read to be interpolated" File of points.

The data must be organized as:
Xi (0), Yi (0)
Xi (1), Yi (1)
...., ....
Xi (NPI-1), Yi (NPI-1)
Coordinates, calculated, of the points of the spline curve can be saved to file with the menu command "Curve / Save the curve to File"; the data format will be ':
Xc (0), Yc (0)
Xc (1), Yc (1)
...., ....
Xc (NPC-1), YC (NPC-1)

NPI and NPCs are, respectively, the number of points to be interpolated and the number of points on which the spline is calculated. The default values ​​can be changed by writing in the "Curve Parameters" boxes.
The points, calculated, the spline curve can be highlighted by ticking the 'appropriate
box at the top, to the right on the graph.
The graph can 'scale be changed by changing the values ​​in the "Graph Scale" boxes.
When you import points to be interpolated from a file, the values ​​of NPI and the "Scale the graph will be updated automatically."

The data points are approximated with a polynomial of Bernstein.

The NK value determines the number of nodes of the approximating curve:
NK = 2 -> line segments.
NK = 3 -> quadratic curves.
... ..................
NK = NPI -> Bezier splines.

C spline:
The data points are interpolated by a cubic spline.

The data points are interpolated by a spline at an exponential voltage.
VZ parameter allows you to choose the tension of the curve: larger values ​​of VZ flatten the curve.

No comments:

Post a Comment