Difference between revisions of "Spline Command"
From GeoGebra Manual
(Created page with "<noinclude>{{Manual Page|version=5.0}}</noinclude>{{betamanual|version=5.0}} {{command|geometry}} ;Spline[ <List of Points> ] :Creates a spline th...") |
m (style) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | <noinclude>{{Manual Page|version=5.0}}</noinclude> | + | <noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|geometry}} |
− | {{command|geometry}} | + | ;Spline( <List of Points> ) |
− | ;Spline | + | :Creates a cubic [[w:Spline_(mathematics)|spline]] through all points. |
− | :Creates a [[w:Spline_(mathematics)|spline]] through all points. | + | ;Spline( <List of Points>, <Order ≥ 3> ) |
− | ;Spline | ||
:Creates a spline with given order through all points. | :Creates a spline with given order through all points. | ||
+ | ;Spline( <List of Points>, <Order ≥ 3>, <Weight Function> ) | ||
+ | :Creates a spline with given order through all points. The weight function says what should be the difference of ''t'' values for point ''P''<sub>i</sub> and ''P''<sub>i+1</sub> given their difference ''P''<sub>i+1</sub> - ''P''<sub>i</sub> = (''x'', ''y''). To get the spline you expect from "function" algorithm you should use <code>abs(x)+0*y</code>, to get the GeoGebra's default spline you can use <code>sqrt(x^2+y^2)</code>. | ||
+ | :{{Note|The choice of default makes the result behave nicely when transformed, making sure that <code>Rotate(Spline(list), a)</code> gives the same as <code>Spline(Rotate(list, a))</code>.}} |
Latest revision as of 08:54, 30 July 2020
- Spline( <List of Points> )
- Creates a cubic spline through all points.
- Spline( <List of Points>, <Order ≥ 3> )
- Creates a spline with given order through all points.
- Spline( <List of Points>, <Order ≥ 3>, <Weight Function> )
- Creates a spline with given order through all points. The weight function says what should be the difference of t values for point Pi and Pi+1 given their difference Pi+1 - Pi = (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 usesqrt(x^2+y^2)
. - Note: The choice of default makes the result behave nicely when transformed, making sure that
Rotate(Spline(list), a)
gives the same asSpline(Rotate(list, a))
.
Comments
The result of the spline command is a curve. Spline algorithm is used for x and y coordinates separately: first we determine values of t that correspond to the points (based on Euclidian distances between the points), then we find cubic splines as functions t->x and t->y.