http://t3x.org/klong-stat/f13.kg.html (light|dark)
.l("config.kg")
Cached data set: X::rndn(;2)'err(10;1.5;dist(cdf;30;[-5 5])%30)
X::[-0.11 -0.32 0.32 0.0 0.21 -0.11
-0.11 0.0 0.0 0.03 -0.04 0.1
-0.23 0.73 -0.1 0.14 1.02 0.05
1.11 1.04 0.97 1.0 1.21 1.75
1.11 1.11 1.0 0.79 0.79 0.89]
Compute every 3'rd spline, starting with 3 degrees of freedom
k::3+3*!10
Draw category 3D-grid with k as categories
cgrid3(0,((#X)-1),3;[-0.5 2.0 0.25];$'k)
Make x/y set, compute collection of splines, and plot them; note that the first parameter of sp mirrors the x-axis!
XY::(!#X),'X
S::spl(;XY)'k
plot3({sp(((#X)-1)-x;S@y)})
draw()