1 ## Copyright (C) 2002-2009 Etienne Grossmann <etienne@egdn.net>
3 ## This program is free software; you can redistribute it and/or modify it under
4 ## the terms of the GNU General Public License as published by the Free Software
5 ## Foundation; either version 3 of the License, or (at your option) any later
8 ## This program is distributed in the hope that it will be useful, but WITHOUT
9 ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13 ## You should have received a copy of the GNU General Public License along with
14 ## this program; if not, see <http://www.gnu.org/licenses/>.
17 " VRML Mini-HOWTO's first listing\n",\
18 " Display a quadratic surface w/ 31 x 31 points\n\n"]);
20 printf ([" Reminder of FreeWRL keystrokes and mouse actions :\n"\
22 " w : switch to walk mode\n",\
23 " e : switch to examine mode\n",\
24 " h : toggle headlights on or off\n",\
25 " drag left mouse : rotate (examine mode) or translate\n",\
27 " drag right mouse : zoom (examine mode) or translate\n",\
33 x = linspace (-1,1,31);
35 [xx,yy] = meshgrid (x,x);
41 ## Variant of listing 1
43 printf (" Hit a key to see the variant of listing 1\n\n");
47 vmesh (zz,"checker",[5,-2],"col",[1 0 0;0.7 0.7 0.7]', "emit",0);
49 vmesh (zz,"checker",[5,-2],"col",[1 0 0;0.7 0.7 0.7]', "emit",0);
51 printf (" Another one, just with 7 x 7 points\n");
53 x = linspace (-1,1,7);
55 [xx,yy] = meshgrid (x,x);
57 zz = 2 - xx.^2 - yy.^2;
59 printf (" Now, with steps, then barss\n");