]> gitweb.factorcode.org Git - factor.git/blob - extra/math/splines/splines-docs.factor
Switch to https urls
[factor.git] / extra / math / splines / splines-docs.factor
1 ! Copyright (C) 2010 Erik Charlebois.
2 ! See https://factorcode.org/license.txt for BSD license.
3 USING: help.markup help.syntax math ;
4 IN: math.splines
5
6 HELP: <bezier-curve>
7 { $values
8     { "control-points" "sequence of control points same dimension" }
9     { "polynomials" "sequence of polynomials for each dimension" }
10 }
11 { $description "Creates bezier curve polynomials for the given control points." } ;
12
13 HELP: <catmull-rom-spline>
14 { $values
15     { "points" "points on the spline" } { "m0" "initial tangent vector" } { "mn" "final tangent vector" }
16     { "polynomials-sequence" "sequence of sequences of polynomials" }
17 }
18 { $description "Creates a sequence of cubic hermite curves (each a sequence of polynomials) passing through the given points and generating tangents for C1 continuity." } ;
19
20 HELP: <cubic-hermite-curve>
21 { $values
22     { "p0" "start point" } { "m0" "start tangent" } { "p1" "end point" } { "m1" "end tangent" }
23     { "polynomials" "sequence of polynomials" }
24 }
25 { $description "Creates a sequence of polynomials (one per dimension) for the curve passing through " { $emphasis "p0" } " and " { $emphasis "p1" } "." } ;
26
27 HELP: <cubic-hermite-spline>
28 { $values
29     { "point-tangent-pairs" "sequence of point and tangent pairs" }
30     { "polynomials-sequence" "sequence of sequences of polynomials" }
31 }
32 { $description "Creates a sequence of cubic hermite curves (each a sequence of polynomials) passing through the given points with the given tangents." } ;
33
34 HELP: <kochanek-bartels-curve>
35 { $values
36     { "points" "points on the spline" } { "m0" "start tangent" } { "mn" "end tangent" } { "tension" number } { "bias" number } { "continuity" number }
37     { "polynomials-sequence" "sequence of sequence of polynomials" }
38 }
39 { $description "Creates a sequence of cubic hermite curves (each a sequence of polynomials) passing through the given points, generating tangents with the given tuning parameters." } ;
40
41 ARTICLE: "math.splines" "Common parametric curves."
42 "The curve creating functions create sequences of polynomials, one for each degree of the input points. The spline creating functions create sequences of these curve polynomial sequences. The " { $vocab-link "math.splines.viewer" } " vocabulary provides a gadget to evaluate the generated polynomials and view the results." ;
43
44 ABOUT: "math.splines"