# set terminal pngcairo transparent enhanced font "arial,10" fontscale 1.0 size 600, 400 # set output 'spline.4.png' set bar 1.000000 front set style circle radius graph 0.02, first 0.00000, 0.00000 set style ellipse size graph 0.05, 0.03, first 0.00000 angle 0 units xy set grid nopolar set grid xtics nomxtics ytics nomytics noztics nomztics \ nox2tics nomx2tics noy2tics nomy2tics nocbtics nomcbtics set grid layerdefault lt black linewidth 0.200 dashtype solid, lt black linewidth 0.200 dashtype solid set key inside right top vertical Right noreverse enhanced autotitle box lt black linewidth 1.000 dashtype solid set style textbox transparent margins 1.0, 1.0 border unset logscale set style data lines unset paxis 1 tics unset paxis 2 tics unset paxis 3 tics unset paxis 4 tics unset paxis 5 tics unset paxis 6 tics unset paxis 7 tics set title "The cubic uniform Bspline basis functions" set xrange [ 0.00000 : 1.00000 ] noreverse nowriteback set yrange [ -0.200000 : 1.40000 ] noreverse nowriteback set paxis 1 range [ * : * ] noreverse nowriteback set paxis 2 range [ * : * ] noreverse nowriteback set paxis 3 range [ * : * ] noreverse nowriteback set paxis 4 range [ * : * ] noreverse nowriteback set paxis 5 range [ * : * ] noreverse nowriteback set paxis 6 range [ * : * ] noreverse nowriteback set paxis 7 range [ * : * ] noreverse nowriteback set colorbox vertical origin screen 0.9, 0.2, 0 size screen 0.05, 0.6, 0 front noinvert bdefault m0(x) = 1 m1(x) = x m2(x) = x**2 m3(x) = x**3 h00(x) = x**2 * ( 2 * x - 3) + 1 h01(x) = -x**2 * (2 * x - 3) h10(x) = x * (x - 1)**2 h11(x) = x**2 * (x - 1) bez0(x) = (1 - x)**3 bez1(x) = 3 * (1 - x)**2 * x bez2(x) = 3 * (1 - x) * x**2 bez3(x) = x**3 bsp0(x) = ( 1 - 3 * x + 3 * x**2 - x**3 ) / 6 bsp1(x) = ( 4 - 6 * x**2 + 3 * x**3 ) / 6 bsp2(x) = ( 1 + 3 * x + 3 * x**2 - 3 * x**3 ) / 6 bsp3(x) = x**3 / 6 GPFUN_m0 = "m0(x) = 1" GPFUN_m1 = "m1(x) = x" GPFUN_m2 = "m2(x) = x**2" GPFUN_m3 = "m3(x) = x**3" GPFUN_h00 = "h00(x) = x**2 * ( 2 * x - 3) + 1" GPFUN_h01 = "h01(x) = -x**2 * (2 * x - 3)" GPFUN_h10 = "h10(x) = x * (x - 1)**2" GPFUN_h11 = "h11(x) = x**2 * (x - 1)" GPFUN_bez0 = "bez0(x) = (1 - x)**3" GPFUN_bez1 = "bez1(x) = 3 * (1 - x)**2 * x" GPFUN_bez2 = "bez2(x) = 3 * (1 - x) * x**2" GPFUN_bez3 = "bez3(x) = x**3" GPFUN_bsp0 = "bsp0(x) = ( 1 - 3 * x + 3 * x**2 - x**3 ) / 6" GPFUN_bsp1 = "bsp1(x) = ( 4 - 6 * x**2 + 3 * x**3 ) / 6" GPFUN_bsp2 = "bsp2(x) = ( 1 + 3 * x + 3 * x**2 - 3 * x**3 ) / 6" GPFUN_bsp3 = "bsp3(x) = x**3 / 6" plot bsp0(x), bsp1(x), bsp2(x), bsp3(x)