Stupid gallery of 3d images generated with scilab + enricolib
Isosurface of data in hypermat w, normal flat shading;
[n1,n2,n3]=size(w)
w1=hypermat([n1+2,n2+2,n3+2],100*ones(n1+2,(n2+2)*(n3+2)));
w1(2:n1+1,2:n2+1,2:n3+1)=w;
[xx,yy,zz]=isosurf3d(0:n+1,0:n+1,[t(1);t;t($)],w1,-0.5);
c=shadecomp(xx,yy,zz,[1 0 1],3,-1);
xbasc();
plot3d1(xx,yy,list(zz,c*(xget('lastpattern')-1)+1),43,81,'x@y@t',[-1
2 4])
Isosurface, shading computed with shadecomp(...,2) (Goraud vertex averaging),
but colors then face-averaged with c=mean(c,'r'):
c=shadecomp(xx,yy,zz,[1 0 1],3,-2); c=mean(c,'r');
xbasc();
plot3d1(xx,yy,list(zz,c*(xget('lastpattern')-1)+1),43,81,'x@y@t',[-1
2 4])
Goraud shading: shadecomp(...,2) [and for scilab <=2.5: + Stéphane
Mottelet's plot3d patch]
c=shadecomp(xx,yy,zz,[1 0 1],3,-2);
xbasc();plot3d1(xx,yy,list(zz,c*(xget('lastpattern')-1)+1),43,81)
various 3d objects (flat shading) in different colors (stacked colormap)
(the dark hairs on the spiralling arrow are a fault of Scilab's Gif driver
[Scilab <=2.5], not mine)
spaghetti() on a black background. Again, the yellow hairs depend on the
gif driver.
trisplit() used as a preprocessor for the accurate representation of quadrangular
facelets with interpolated color.
"spyglass" like slices
nx=21; ny=25; nz=30;
s=hypermat([nx,ny,nz]);
x=linspace(-4.5,4.5,nx)'*ones(1,ny);
y=ones(nx,1)*linspace(-4.5,4.5,ny);
z=linspace(-4.5,4.5,nz);
for i=1:nz; s(:,:,i)=x.^2 + y.^2 + z(i)^2; end
[xx,yy,zz,c]=slice3d(x(:,1)',y(1,:),z,s,-[1 10 16],-[4 8 12],15);
[xx,yy,zz,c]=trisplit(xx,yy,zz,c);
setcmap(16)
xbasc();oplot3d(list(xx,yy,zz,c,1),32,35,45,'x@y@z',[-1 6 4])
Back to the main scistuff page