Octave graphic add-on, Octaviz



česky

1.9 Surf 3D graph - vtk_surf



Function file: f = vtk_surf (x,y,z [fmt| prop, val])


Displays a surface plot defined by x,y,z matrices, where x and y are typically formed by meshgrid.

Parameter fmt:
color of surface - parameter Color
transparency (opacity) - parameter Opacity


Example:
[x,y]=meshgrid(0:1:4*pi,0:1:4*pi);
z=sin(x)-0.4*y;
vtk_surf(x,y,z);



Spherical harmonics:
[phi,theta]=meshgrid(0:pi/250:pi,0:pi/250:2*pi);
m0=4;m1=3;m2=2;m3=3;m4=6;m5=2;m6=6;m7=4;
r=sin(m0*phi).^m1+cos(m2*phi).^m3+sin(m4*theta).^m5+cos(m6*theta).^m7;
x=r.*sin(phi).*cos(theta);
y=r.*cos(phi);
z=r.*sin(phi).*sin(theta);
vtk_surf(x,y,z)



<<< 1.8 3D polygon - vtk_poly3 1.10 Surf 3D graph with setup color conversion - vtk_surfc >>>

© 2008 David Prokop