From: Dragan T. <dr...@us...> - 2004-11-28 03:26:11
|
Update of /cvsroot/octaviz/octaviz/Scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7983 Modified Files: vtk_figure.m vtk_line3.m vtk_mesh.m vtk_surf.m Log Message: Added examples in DOCSTRING for vtk_line3.m vtk_mesh.m vtk_surf.m. Index: vtk_mesh.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_mesh.m,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- vtk_mesh.m 25 Oct 2004 05:37:09 -0000 1.4 +++ vtk_mesh.m 28 Nov 2004 03:25:26 -0000 1.5 @@ -24,7 +24,14 @@ ## Optional @var{prop},@var{val} arguments can be used to change ## properties of the plot. Currently, valid properties are ## ";BallRadius;LineRadius;Fancy;". -## +## Example: Triaxial Teardrop +## +## [u,v] = meshgrid(0:pi/20:pi,0:pi/20:2*pi); +## x = ( 1 - cos(u) ) .* cos( u + 2*pi/3 ) .* cos( v + 2*pi/3 ) / 2; +## y = ( 1 - cos(u) ) .* cos( u + 2*pi/3 ) .* cos( v - 2*pi/3 ) / 2; +## z = cos( u - 2*pi/3 ); +## vtk_mesh(x,y,z,'Fancy',1); +## ## @end deftypefn ## @seealso{vtk_trimesh, vtk_surf} Index: vtk_figure.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_figure.m,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- vtk_figure.m 24 Oct 2004 02:19:14 -0000 1.4 +++ vtk_figure.m 28 Nov 2004 03:25:18 -0000 1.5 @@ -162,7 +162,7 @@ axes = vtkCubeAxesActor2D; axes.SetCamera(renderer.GetActiveCamera()); - axes.SetLabelFormat("%4.2g"); + axes.SetLabelFormat("%4.2f"); axes.SetFlyModeToOuterEdges(); axes.SetFontFactor(1.0); axes.SetNumberOfLabels(5); Index: vtk_surf.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_surf.m,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- vtk_surf.m 25 Oct 2004 05:37:10 -0000 1.4 +++ vtk_surf.m 28 Nov 2004 03:25:26 -0000 1.5 @@ -23,7 +23,18 @@ ## Optional @var{prop},@var{val} arguments can be used to change ## properties of the plot. Currently, valid properties are ## ";Opacity;Color;". -## +## +## Example: Spherical harmonics +## @example +## [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); +## @end example +## ## @end deftypefn ## @seealso{vtk_trisurf, vtk_mesh} Index: vtk_line3.m =================================================================== RCS file: /cvsroot/octaviz/octaviz/Scripts/vtk_line3.m,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- vtk_line3.m 23 Oct 2004 18:47:58 -0000 1.2 +++ vtk_line3.m 28 Nov 2004 03:25:26 -0000 1.3 @@ -22,6 +22,15 @@ ## specification"; e.g. "r" would cause the lines to be plotted in color ## red. The optional @var{prop},@var{val} is a property,value pair ## argument. Valid properties are Color, Radius, and Opacity. +## Example: Knot (torus) +## nmeridian = 6; nlongitude = 11; +## phi = 0:pi/1000:2*pi; +## mu = phi * nmeridian; +## x = cos(mu) .* (1 + cos(nlongitude*mu/nmeridian) / 2.0); +## y = sin(mu) .* (1 + cos(nlongitude*mu/nmeridian) / 2.0); +## z = sin(nlongitude*mu/nmeridian) / 2.0; +## vtk_line3(x',y',z','Radius',0.05); +## ## @end deftypefn ## @seealso{vtk_plot3,vtk_arrows3,vtk_get_line_spec} |