how to obtain control points for a spline generated through a collection of many points

9 Ansichten (letzte 30 Tage)
I have a data of x and y coordinates that represent a certain aerofoil.
foil_coords=[1 0
0.9984 0.0013
0.9882 0.0104
0.9711 0.0225
0.9439 0.0348
0.9064 0.0477
0.8595 0.0609
0.8041 0.0740
0.7417 0.0867
0.6736 0.0986
0.6016 0.1094
0.5274 0.1188
0.4534 0.1268
0.3819 0.1327
0.3149 0.1353
0.2537 0.1335
0.1985 0.1259
0.1486 0.1135
0.1048 0.0977
0.0679 0.0794
0.0386 0.0597
0.0175 0.0396
0.0050 0.0197
0.0001 0.0018
0.0026 -0.0112
0.0172 -0.0155
0.0463 -0.0153
0.0879 -0.0120
0.1402 -0.0056
0.2028 0.0053
0.2767 0.0193
0.3604 0.0336
0.4514 0.0462
0.5464 0.0553
0.6418 0.0598
0.7334 0.0587
0.8173 0.0522
0.8893 0.0409
0.9457 0.0262
0.9826 0.0106
0.9982 0.0011
1 0];
fstart_x=foil_coords(:,1); %generates x coordinates along the chord
fstart_y=foil_coords(:,2); %generates y coordinates perpendicular to the chord
plot(fstart_x,fstart_y) %plots initial aerofoil
axis equal
Is there a way to use a specific number (lets say 5) and find the 5 control points to generate the spline for the aerofoil through the given coordinates?

Antworten (1)

Aditya
Aditya am 11 Sep. 2023
Hi Odysseas,
What I understand from your issue is that you want to generate control points for you curve. So, there isn't a singular standardized approach for this. However, there are several techniques you can employ, such as interpolation or approximation methods. Here are a couple of possible options listed below:
  1. Interpolation: Interpolation techniques, including linear, polynomial (e.g., Lagrange or Newton polynomials), or spline interpolation (e.g., cubic splines), can be utilized to determine control points that approximate the given collection of points.
  2. Approximation: Approximation methods aim to find a simplified representation of the provided points. Techniques such as least squares fitting (e.g., polynomial fitting or regression) or curve fitting algorithms (e.g., utilizing the least squares method with B-splines) can be employed to generate control points that best fit the data.
Here are some resources that provide more information about these methods:
These resources will provide you with more detailed explanations, examples, and usage instructions for generating control points from a given collection of points using interpolation or approximation techniques.
Hope this helps!

Kategorien

Mehr zu Interpolation finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by