#!/usr/local/bin/gnuplot -persist # set terminal canvas rounded size 600,400 enhanced fsize 10 lw 1.6 fontscale 1 name "voxel_2" jsdir "." # set output 'voxel.2.js' unset border set style fill transparent solid 0.50 border unset key set object 1 rect from screen 0, 0 to screen 1, 1 set object 1 behind clip lw 1.0 dashtype solid fc rgb "white" fillstyle solid 1.00 border lt -1 set view 48, 114, 1.6, 0.9 set samples 50, 50 set isosamples 50, 50 set style data lines set xzeroaxis lt black linewidth 1.000 dashtype solid set yzeroaxis lt black linewidth 1.000 dashtype solid set zzeroaxis lt black linewidth 1.000 dashtype solid set xyplane at 0 set xtics axis in scale 1,0.5 nomirror norotate autojustify set ytics axis in scale 1,0.5 nomirror norotate autojustify set ztics axis in scale 1,0.5 nomirror norotate autojustify unset cbtics set title "orthogonal slices through volume\nusing the density values to color the surfaces" set xrange [ -4.00000 : 4.00000 ] noreverse nowriteback set x2range [ * : * ] noreverse writeback set yrange [ -4.00000 : 4.00000 ] noreverse nowriteback set y2range [ * : * ] noreverse writeback set zrange [ -4.00000 : 4.00000 ] noreverse nowriteback set cblabel "point density" set cbrange [ 1.00000 : 40.0000 ] noreverse writeback set rrange [ * : * ] noreverse writeback set logscale cb 10 set pm3d depthorder set pm3d interpolate 2,2 flush begin noftriangles noborder corners2color mean set pm3d clip z noclipcb set palette negative nops_allcF maxcolors 0 gamma 1.5 color model RGB set palette cubehelix start 0.5 cycles -1.5 saturation 1 set colorbox vertical origin screen 0.9, 0.2 size screen 0.05, 0.6 front noinvert bdefault isint(x)=(int(x)==x) Binv(p,q)=exp(lgamma(p+q)-lgamma(p)-lgamma(q)) arcsin(x,r)=r<=0?1/0:abs(x)>r?0.0:invpi/sqrt(r*r-x*x) beta(x,p,q)=p<=0||q<=0?1/0:x<0||x>1?0.0:Binv(p,q)*x**(p-1.0)*(1.0-x)**(q-1.0) binom(x,n,p)=p<0.0||p>1.0||n<0||!isint(n)?1/0: !isint(x)?1/0:x<0||x>n?0.0:exp(lgamma(n+1)-lgamma(n-x+1)-lgamma(x+1) +x*log(p)+(n-x)*log(1.0-p)) cauchy(x,a,b)=b<=0?1/0:b/(pi*(b*b+(x-a)**2)) chisq(x,k)=k<=0||!isint(k)?1/0: x<=0?0.0:exp((0.5*k-1.0)*log(x)-0.5*x-lgamma(0.5*k)-k*0.5*log2) erlang(x,n,lambda)=n<=0||!isint(n)||lambda<=0?1/0: x<0?0.0:x==0?(n==1?real(lambda):0.0):exp(n*log(lambda)+(n-1.0)*log(x)-lgamma(n)-lambda*x) extreme(x,mu,alpha)=alpha<=0?1/0:alpha*(exp(-alpha*(x-mu)-exp(-alpha*(x-mu)))) f(x,d1,d2)=d1<=0||!isint(d1)||d2<=0||!isint(d2)?1/0: Binv(0.5*d1,0.5*d2)*(real(d1)/d2)**(0.5*d1)*x**(0.5*d1-1.0)/(1.0+(real(d1)/d2)*x)**(0.5*(d1+d2)) gmm(x,rho,lambda)=rho<=0||lambda<=0?1/0: x<0?0.0:x==0?(rho>1?0.0:rho==1?real(lambda):1/0): exp(rho*log(lambda)+(rho-1.0)*log(x)-lgamma(rho)-lambda*x) geometric(x,p)=p<=0||p>1?1/0: !isint(x)?1/0:x<0||p==1?(x==0?1.0:0.0):exp(log(p)+x*log(1.0-p)) halfnormal(x,sigma)=sigma<=0?1/0:x<0?0.0:sqrt2invpi/sigma*exp(-0.5*(x/sigma)**2) hypgeo(x,N,C,d)=N<0||!isint(N)||C<0||C>N||!isint(C)||d<0||d>N||!isint(d)?1/0: !isint(x)?1/0:x>d||x>C||x<0||x1?1/0: !isint(x)?1/0:x<0?0.0:p==1?(x==0?1.0:0.0):exp(lgamma(r+x)-lgamma(r)-lgamma(x+1)+ r*log(p)+x*log(1.0-p)) nexp(x,lambda)=lambda<=0?1/0:x<0?0.0:lambda*exp(-lambda*x) normal(x,mu,sigma)=sigma<=0?1/0:invsqrt2pi/sigma*exp(-0.5*((x-mu)/sigma)**2) pareto(x,a,b)=a<=0||b<0||!isint(b)?1/0:x=a?0.0:f==0?1.0/a:2.0/a*sin(f*pi*x/a)**2/(1-sin(twopi*f)) t(x,nu)=nu<0||!isint(nu)?1/0: Binv(0.5*nu,0.5)/sqrt(nu)*(1+real(x*x)/nu)**(-0.5*(nu+1.0)) triangular(x,m,g)=g<=0?1/0:x=m+g?0.0:1.0/g-abs(x-m)/real(g*g) uniform(x,a,b)=x<(a=(a>b?a:b)?0.0:1.0/abs(b-a) weibull(x,a,lambda)=a<=0||lambda<=0?1/0: x<0?0.0:x==0?(a>1?0.0:a==1?real(lambda):1/0): exp(log(a)+a*log(lambda)+(a-1)*log(x)-(lambda*x)**a) carcsin(x,r)=r<=0?1/0:x<-r?0.0:x>r?1.0:0.5+invpi*asin(x/r) cbeta(x,p,q)=ibeta(p,q,x) cbinom(x,n,p)=p<0.0||p>1.0||n<0||!isint(n)?1/0: !isint(x)?1/0:x<0?0.0:x>=n?1.0:ibeta(n-x,x+1.0,1.0-p) ccauchy(x,a,b)=b<=0?1/0:0.5+invpi*atan((x-a)/b) cchisq(x,k)=k<=0||!isint(k)?1/0:x<0?0.0:igamma(0.5*k,0.5*x) cerlang(x,n,lambda)=n<=0||!isint(n)||lambda<=0?1/0:x<0?0.0:igamma(n,lambda*x) cextreme(x,mu,alpha)=alpha<=0?1/0:exp(-exp(-alpha*(x-mu))) cf(x,d1,d2)=d1<=0||!isint(d1)||d2<=0||!isint(d2)?1/0:1.0-ibeta(0.5*d2,0.5*d1,d2/(d2+d1*x)) cgmm(x,rho,lambda)=rho<=0||lambda<=0?1/0:x<0?0.0:igamma(rho,x*lambda) cgeometric(x,p)=p<=0||p>1?1/0: !isint(x)?1/0:x<0||p==0?0.0:p==1?1.0:1.0-exp((x+1)*log(1.0-p)) chalfnormal(x,sigma)=sigma<=0?1/0:x<0?0.0:erf(x/sigma/sqrt2) chypgeo(x,N,C,d)=N<0||!isint(N)||C<0||C>N||!isint(C)||d<0||d>N||!isint(d)?1/0: !isint(x)?1/0:x<0||xd||x>C?1.0:hypgeo(x,N,C,d)+chypgeo(x-1,N,C,d) claplace(x,mu,b)=b<=0?1/0:(x1?1/0: !isint(x)?1/0:x<0?0.0:ibeta(r,x+1,p) cnexp(x,lambda)=lambda<=0?1/0:x<0?0.0:1-exp(-lambda*x) cpareto(x,a,b)=a<=0||b<0||!isint(b)?1/0:xa?1.0:f==0?real(x)/a:(real(x)/a-sin(f*twopi*x/a)/(f*twopi))/(1.0-sin(twopi*f)/(twopi*f)) ct(x,nu)=nu<0||!isint(nu)?1/0:0.5+0.5*sgn(x)*(1-ibeta(0.5*nu,0.5,nu/(nu+x*x))) ctriangular(x,m,g)=g<=0?1/0: x=m+g?1.0:0.5+real(x-m)/g-(x-m)*abs(x-m)/(2.0*g*g) cuniform(x,a,b)=x<(a=(a>b?a:b)?1.0:real(x-a)/(b-a) cweibull(x,a,lambda)=a<=0||lambda<=0?1/0:x<0?0.0:1.0-exp(-(lambda*x)**a) tstring(n) = sprintf("Gaussian 3D cloud of %d random samples\ncolored by local point density", n) VoxelDistance = 0.31691416401353 fourinvsqrtpi = 2.25675833419103 invpi = 0.318309886183791 invsqrt2pi = 0.398942280401433 log2 = 0.693147180559945 sqrt2 = 1.4142135623731 sqrt2invpi = 0.797884560802865 twopi = 6.28318530717959 nsamp = 3000 rlow = -4.0 rhigh = 4.0 z = 0.0 ## Last datafile plotted: "++" splot '++' using 1:(0):2:(voxel($1,0,$2)) with pm3d, '++' using 1:2:(0):(voxel($1,$2,0)) with pm3d, '++' using (0):1:2:(voxel(0,$1,$2)) with pm3d