aboutsummaryrefslogtreecommitdiff
path: root/math/deboor/progs/prog5.f
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /math/deboor/progs/prog5.f
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'math/deboor/progs/prog5.f')
-rw-r--r--math/deboor/progs/prog5.f27
1 files changed, 27 insertions, 0 deletions
diff --git a/math/deboor/progs/prog5.f b/math/deboor/progs/prog5.f
new file mode 100644
index 00000000..b1fbb927
--- /dev/null
+++ b/math/deboor/progs/prog5.f
@@ -0,0 +1,27 @@
+chapter x. example 2. plotting the pol,s which make up a b-spline
+c from * a practical guide to splines * by c. de boor
+calls bsplvb
+c
+ integer ia,left
+ real biatx(4),t(11),values(4),x
+c knot sequence set here....
+ data t / 4*0.,1.,3.,4.,4*6. /
+ do 20 ia=1,40
+ x = float(ia)*.2 - 1.
+ do 10 left=4,7
+ call bsplvb ( t, 4, 1, x, left, biatx )
+c
+c according to bsplvb listing, biatx(.) now contains value
+c at x of polynomial which agrees on the interval (t(left),
+c t(left+1) ) with the b-spline b(left-4 + . ,4,t) . hence,
+c biatx(8-left) now contains value of that polynomial for
+c b(left-4 +(8-left) ,4,t) = b(4,4,t) . since this b-spline
+c has support (t(4),t(8)), it makes sense to run left = 4,
+c ...,7, storing the resulting values in values(1),...,
+c values(4) for later printing.
+c
+ 10 values(left-3) = biatx(8-left)
+ 20 print 620, x, values
+ 620 format(f10.1,4f20.8)
+ stop
+ end