Top Level Namespace

Includes:
PSPLINE

Defined Under Namespace

Modules: PSPLINE Classes: Array

Constant Summary collapse

Ad =

puts “# Interpolation of the Bessel function”

Data points

[[-4.0, 1.34095e-3],[-3.6, 2.98189e-3],[-3.2, 6.62420e-3],[-2.8, 1.46827e-2],
[-2.4, 3.23838e-2],[-2.0, 7.06508e-2],[-1.6, 1.50527e-1],[-1.2, 3.05020e-1],
[-0.8, 5.59055e-1],[-0.4, 8.55639e-1],[ 0.4, 8.55639e-1],[ 0.8, 5.59055e-1],
[ 1.2, 3.05020e-1],[ 1.6, 1.50527e-1],[ 2.0, 7.06508e-2],[ 2.4, 3.23838e-2],
[ 2.8, 1.46827e-2],[ 3.2, 6.62420e-3],[ 3.6, 2.98189e-3],[ 4.0, 1.34095e-3]]
Jbn =
ARGV[0].to_i
Dp =
10
Bs =
Bspline.new(XY, 12, 5, 1)
C =

Additional data points

[ [0.0, 1.0],[0.0, 0.0],[6.283185, 1.0],[6.283185, 0.0] ]
XY =

puts “# Interpolation of the Jacobi function”

[ [0, 4.0, 0.0],[1, 3.0, 3.0],[2, 0.0, 4.0],[3,-3.0, 3.0],
[4,-4.0, 0.0],[5,-3.0,-3.0],[6, 0.0,-4.0],[7, 3.0,-3.0],
[8, 4.0, 0.0] ]
D =
[1, 2, 1, 2]
Bd =
[[-4.0, -4.0],[-3.6, -3.6],[-3.2, -3.2],[-2.8, -2.8],
[-2.4, -2.4],[-2.0, -2.0],[-1.6, -1.6],[-1.2, -1.2],
[-0.8, -0.8],[-0.4, -0.4],[ 0.4,  0.4],[ 0.8,  0.8],
[ 1.2,  1.2],[ 1.6,  1.6],[ 2.0,  2.0],[ 2.4,  2.4],
[ 2.8,  2.8],[ 3.2,  3.2],[ 3.6,  3.6],[ 4.0,  4.0]]
As =
Bspline.new(Ad, 20, 5)
Ps =
Pspline.new(XYZ, [S, T], nn, jj, ss)
X =
[ 0, 0, 0, 1, 1, 1, 1, 0, 0, 0 ]
Y =
[ [ 4.0, 0.0],[ 3.0, 3.0],[ 0.0, 4.0],[-3.0, 3.0],
[-4.0, 0.0],[-3.0,-3.0],[ 0.0,-4.0],[ 3.0,-3.0] ]
Qs =
Bspline.new(XY, 16, 9, 1)
Rs =
Pspline.new(XYZ, [S, T], nn, jj, ss)
Sp =
Bspline.new(XY, n, j, s)
S =
[0, 1, 2, 3, 4]
T =
[0, 1, 2, 3, 4, 5]
XYZ =
[ [[ 0.0, 5.0, 9.0],[ 0.0, 5.0, 6.0],[ 0.0, 0.5, 6.0],[ 0.0, 0.5, 2.0],[ 0.0, 3.0, 1.0],[ 0.0, 3.0, 0.0]],
[[ 5.0,-2.5, 6.5],[ 5.0,-2.5, 3.5],[ 0.5,-0.25,5.75],[0.5,-0.25,1.75],[3.0,-1.5,-0.5],[ 3.0,-1.5,-1.5]],
[[ 0.0,-5.0, 9.0],[ 0.0,-5.0, 6.0],[ 0.0,-0.5, 6.0],[ 0.0,-0.5, 2.0],[ 0.0,-3.0, 1.0],[ 0.0,-3.0, 0.0]],
[[-5.0, 2.5,11.5],[-5.0, 2.5, 8.5],[-0.5,0.25,6.25],[-0.5,0.25,2.25],[-3.0, 1.5, 2.5],[-3.0, 1.5, 1.5]] ]
N =
Rs.plot(vv, Dp, [Jbn,0]) do |a, b|
	if (a[1] == 0.0)
		printf("%.3f %.3f % .7f % .7f %10.7f\n", a[0], a[1], b[0], b[1], b[2])
	end
end
Sint =
Qs.line_integral(lambda{|x,y|Math.sqrt(x*x+y*y)*0.5}, vv)

Constants included from PSPLINE

PSPLINE::VERSION