changeset 944:6201b65a0a83 octave-forge

Misc small fixes in behavior and doc.
author etienne
date Thu, 29 May 2003 13:00:25 +0000
parents eac1406de611
children 5797a1533a35
files main/vrml/test_vmesh.m main/vrml/vmesh.m main/vrml/vrml_browse.m main/vrml/vrml_faces.m
diffstat 4 files changed, 27 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- a/main/vrml/test_vmesh.m	Tue May 27 14:30:18 2003 +0000
+++ b/main/vrml/test_vmesh.m	Thu May 29 13:00:25 2003 +0000
@@ -32,15 +32,15 @@
 printf ("Press a key.\n"); pause;
 
 printf (["The same surface, with checkered stripes ",\
-	 "(see 'checker' option).\n"]);
+	 "(see the 'checker' option).\n"]);
 
-vmesh (z,"checker",-[6,3]);
+vmesh (z,"checker",-[6,5]);
 
 printf ("Press a key.\n"); pause;
 
-printf (["The same surface, with heat coloring (see 'zrb', 'zgrey'\n",\
+printf (["The same surface, with z-dependent coloring (see 'zrb', 'zgrey'\n",\
 	 "  and 'zcol' options)\n"]);
 
 vmesh (z,"zrb");
 
-printf ("That's it!\n")
\ No newline at end of file
+printf ("That's it!\n");
\ No newline at end of file
--- a/main/vrml/vmesh.m	Tue May 27 14:30:18 2003 +0000
+++ b/main/vrml/vmesh.m	Thu May 29 13:00:25 2003 +0000
@@ -14,7 +14,7 @@
 ##
 ## Options : (all options of vrml_surf may be used too)
 ##
-## "col" , col  : 3      : RGB Color,                default = [0.3,0.4,0.9]
+## "col" , col  : 3      : RGB Color,                Default = [0.3,0.4,0.9]
 ##             or 3x(R*C): Color of vertices (vrml colorPerVertex is TRUE).
 ##             or 3x((R-1)*(C-1))
 ##                       : Color of facets
@@ -26,9 +26,18 @@
 ##                       : Reflectivity of facets.
 ##
 ## "checker", c : 1x2 : Color as a checker. If c(1) is positive, checker has
-##            c(1) rows. If it is negative, each checker row is c(1) facets
-##            high c(2) likewise determines width of checker columns.
-## "checker", c : 1x1 : Same as [c,c].
+##                      c(1) rows. If it is negative, each checker row is
+##                      c(1) facets high. c(2) does the same for columns.
+##             or 1x1 : Same as [c,c].
+##
+## "zgray"            : Color varies from black for lowest point to white
+##                      for highest.
+##
+## "zrb"              : Color varies from blue for lowest point to red for
+##                      highest.
+##
+## "zcol", zcol : Mx3 : Color is linearly interpolated between the RGB
+##                      values specified by the rows of zcol.
 ##
 ##        RGB and reflectivity values should be in the [0,1] interval.
 ##
@@ -36,8 +45,8 @@
 ##
 ##                        z == l(i)   (1 <= i <= length(l))
 ## 
-## "lcol", lc   : Color of the plane(s).                        <[.7 .7 .7]>
-## "ltran",lt   : Transparency of the level plane(s).                  <0.3>
+## "lcol", lc   : Nx3 : Color of the plane(s).          Default = [.7 .7 .7]
+## "ltran",lt   : Nx1 : Transparency of the plane(s).   Default =        0.3
 
 ## Author:        Etienne Grossmann  <etienne@isr.ist.utl.pt>
 
@@ -161,16 +170,7 @@
 
 
 vrml_browse (s);
-## keyboard
 
 if ! nargout,  clear s; end
 
-## R=5; C=11;
-## x = ones(R,1)*[1:C]; y = [1:R]'*ones(1,C);
-## zz = z = sin(x)+(2*y/R-1).^2 ;
-## ## Punch some holes
-## holes = ind2sub ([R,C],[3,3,3,1,2,3,2,3;1,2,3,5,7,7,9,10]')
-## z(holes) = nan
-## save_vrml("tmp.wrl",vmesh(x,y,z+1))
-## save_vrml("tmp.wrl",vmesh(z,"col",[0.5,0,0],"tran",0.5),vmesh(z+1))
 
--- a/main/vrml/vrml_browse.m	Tue May 27 14:30:18 2003 +0000
+++ b/main/vrml/vrml_browse.m	Thu May 29 13:00:25 2003 +0000
@@ -13,11 +13,11 @@
 ## 'e'   : Examine : mouse 1 and drag rotates the scene
 ##                   mouse 3 and drag moves closer/farther          
 ## 'w'   : Walk    : mouse 1 and drag moves for/backward, turns
-##                   mouse 3 and drag translates parallely to screen
+##                   mouse 3 and drag translates parallel to the screen
 ## 's'   : Save a snapshot in files 'octave.snapshot.NNNN.ppm'
 ## 'q'   : Quit
 ## 
-## WARNING : FreeWRL >0.25 (http://www.crc.ca/FreeWRL/) must be installed
+## WARNING : FreeWRL >0.25 (http://www.crc.ca/FreeWRL/) must be installed.
 ##
 ## BUG     : The vrml browser is not killed when octave exits. Sometimes the
 ##           vrml browser does not get raised or gets raised improperly
@@ -155,20 +155,14 @@
   [out, status] = system ([vrml_b_name," ",b_opt," \"file:",b_temp,"\""], 1);
   if status,
     
-    ## keyboard
-    ## if ([vrml_b_pid] = system([vrml_b_name," ",b_opt," ",b_temp," ",b_log],0,"async")) <= 0
-    ##  [foo,bar,vrml_b_pid] = popen2(vrml_b_name,[b_opt," ",b_temp]) ;
-    ##  if vrml_b_pid <= 0,
-    printf("vrml_browse : Can't spawn browser ...\n");
+    printf("vrml_browse : Can't start browser '%s'. Is it installed?\n",\
+	   vrml_b_name);
     p = vrml_b_pid ;
     return ;
   else
-    ##    pclose (foo);
-    ##    pclose (bar);
+
     vrml_b_pid = str2num (out);
-    if verbose, 
-      printf( "vrml_browse : OK\n");
-    end
+    if verbose, printf( "vrml_browse : OK\n"); end
   end
 end				# End of starting new browser ########
 				# ####################################
--- a/main/vrml/vrml_faces.m	Tue May 27 14:30:18 2003 +0000
+++ b/main/vrml/vrml_faces.m	Thu May 29 13:00:25 2003 +0000
@@ -56,8 +56,8 @@
 
 tran = 0 ;
 col = [0.3, 0.4, 0.9] ;
-emit = 0;
-convex = tcoord = imsz = tex = smooth = creaseAngle = nan ;
+convex = emit = 0;
+tcoord = imsz = tex = smooth = creaseAngle = nan ;
 colorPerVertex = nan;
 DEFcol = DEFcoord = "";