Différences entre versions de « Commande Spline »
m (typo) |
|||
Ligne 17 : | Ligne 17 : | ||
d'abord, nous déterminons les valeurs de t qui correspondent aux points (basés sur des distances euclidiennes entre les points), puis nous exprimons les splines cubiques comme des fonctions t-> x et t-> y. | d'abord, nous déterminons les valeurs de t qui correspondent aux points (basés sur des distances euclidiennes entre les points), puis nous exprimons les splines cubiques comme des fonctions t-> x et t-> y. | ||
</div>}} | </div>}} | ||
+ | |||
+ | |||
+ | |||
+ | ============== | ||
+ | |||
+ | In the beta version we now have a syntax that lets you chose your own mapping from points to the parameter. The syntax is Spline[list of points, degree,function in x and y]. The last parameter says what should be the difference of t values for point P_i and P_{i+1} given that their P_{i+1}-P_i=(x,y). To get the spline you expect from "function" algorithm you should use abs(x)+0*y, to get the GeoGebra's default spline you can use sqrt(x^2+y^2). You can also try 0x+0y+1. The advantage of euclidian distance is that the result behaves nicely with respect to transformations: rotate(spline(list)) gives the same as spline(rotate(list)). The function 0x+0y+1 has this property also | ||
+ | |||
+ | You can start with this file that shows the "manual" approach: | ||
+ | |||
+ | https://beta.geogebra.org/o/yDR3sKNW |
Version du 30 octobre 2016 à 23:38
- Spline[ <Liste de Points> ]
- Crée une cubique, définie par morceaux, passant par tous les points.
- Spline[ <Liste de Points>, <Degré ≥ 3> ]
- Crée une spline, du degré indiqué, passant par tous les points.
Le résultat de la commande Spline[]
est une courbe.
L'algorithme est utilisé séparément pour les coordonnées x et y :
d'abord, nous déterminons les valeurs de t qui correspondent aux points (basés sur des distances euclidiennes entre les points), puis nous exprimons les splines cubiques comme des fonctions t-> x et t-> y.
==
In the beta version we now have a syntax that lets you chose your own mapping from points to the parameter. The syntax is Spline[list of points, degree,function in x and y]. The last parameter says what should be the difference of t values for point P_i and P_{i+1} given that their P_{i+1}-P_i=(x,y). To get the spline you expect from "function" algorithm you should use abs(x)+0*y, to get the GeoGebra's default spline you can use sqrt(x^2+y^2). You can also try 0x+0y+1. The advantage of euclidian distance is that the result behaves nicely with respect to transformations: rotate(spline(list)) gives the same as spline(rotate(list)). The function 0x+0y+1 has this property also
You can start with this file that shows the "manual" approach: