]> Creatis software - CreaPhase.git/blob - octave_packages/vrml-1.0.13/doc-cache
Add a useful package (from Source forge) for octave
[CreaPhase.git] / octave_packages / vrml-1.0.13 / doc-cache
1 # Created by Octave 3.6.2, Tue Jun 19 09:54:03 2012 UTC <root@brouzouf>
2 # name: cache
3 # type: cell
4 # rows: 3
5 # columns: 44
6 # name: <cell-element>
7 # type: sq_string
8 # elements: 1
9 # length: 8
10 best_dir
11
12
13 # name: <cell-element>
14 # type: sq_string
15 # elements: 1
16 # length: 1793
17        [d,w,rx,cv,wx] = best_dir( x, [a , sx ] )
18
19  Some points  x,  are observed and one assumes that they belong to
20  parallel planes. There is an unknown direction  d  s.t. for each
21  point  x(i,:), one has :
22
23          x(i,:)*d == w(j(i)) + noise
24
25  where j is known(given by the matrix  a ), but  w  is unknown.
26
27  Under the assumption that the error on  x  are i.i.d. gaussian,
28  best_dir() returns the maximum likelihood estimate of  d  and  w.
29
30  This function is slower when cv is returned.
31
32  INPUT :
33  -------
34  x  : D x P    P points. Each one is the sum of a point that belongs
35                to a plane and a noise term.
36
37  a  : P x W    0-1 matrix describing association of points (rows of 
38                x) to planes :
39
40            a(p,i) == 1 iff point x(p,:) belongs to the i'th plane.
41
42                                                 Default is ones(P,1)
43  
44  sx : P x 1    Covariance of x(i,:) is sx(i)*eye(D). 
45                                                 Default is ones(P,1)
46  OUTPUT :
47  --------
48  d  : D x 1    All the planes have the same normal, d. d has unit
49                norm.
50
51  w  : W x 1    The i'th plane is { y | y*d = w(i) }.
52
53  rx : P x 1    Residuals of projection of points to corresponding plane.
54
55
56                Assuming that the covariance of  x  (i.e. sx) was known
57                only up to a scale factor, an estimate of the
58                covariance of  x  and  [w;d]  are
59
60                  sx * mean(rx.^2)/mean(sx)       and
61                  cv * mean(rx.^2)/mean(sx),  respectively.
62
63  cv : (D+W)x(D+W) 
64                Covariance of the estimator at [d,w] ( assuming that
65                diag(covariance(vec(x))) == sx ). 
66
67  wx : (D+W)x(D*P)
68                Derivatives of [w;d] wrt to x.
69
70  Author  : Etienne Grossmann <etienne@egdn.net>
71  Created : March 2000
72
73
74
75
76 # name: <cell-element>
77 # type: sq_string
78 # elements: 1
79 # length: 49
80        [d,w,rx,cv,wx] = best_dir( x, [a , sx ] )
81
82
83
84
85 # name: <cell-element>
86 # type: sq_string
87 # elements: 1
88 # length: 12
89 best_dir_cov
90
91
92 # name: <cell-element>
93 # type: sq_string
94 # elements: 1
95 # length: 308
96        [cv,wx] = best_dir_cov(x,a,sx,wd)
97  
98  x    D x P     : 
99  a    P x W     : Same as in best_dir, but sx is compulsory.
100  sx   P x 1     :
101  
102  wd (W+D) x 1   : ML estimate of [w;d]
103
104  cv (W+D)x(W+D) : Covariance of the ML estimator at [w;d]
105
106  wx (W+D)x(P*D) : derivatives of ML estimate wrt to observations
107
108
109
110
111 # name: <cell-element>
112 # type: sq_string
113 # elements: 1
114 # length: 80
115        [cv,wx] = best_dir_cov(x,a,sx,wd)
116  
117  x    D x P     : 
118  a    P x W     : 
119
120
121
122 # name: <cell-element>
123 # type: sq_string
124 # elements: 1
125 # length: 12
126 bound_convex
127
128
129 # name: <cell-element>
130 # type: sq_string
131 # elements: 1
132 # length: 164
133  y = bound_convex(d,h,x,pad=0) 
134
135   y : 3xQ : Corners that define the convex hull of the projection of x
136             in the plane d*y == v. The corners are sorted.
137
138
139
140
141 # name: <cell-element>
142 # type: sq_string
143 # elements: 1
144 # length: 32
145  y = bound_convex(d,h,x,pad=0) 
146
147
148
149
150 # name: <cell-element>
151 # type: sq_string
152 # elements: 1
153 # length: 13
154 checker_color
155
156
157 # name: <cell-element>
158 # type: sq_string
159 # elements: 1
160 # length: 41
161  col = checker_color (R,C, checker, col)
162
163
164
165 # name: <cell-element>
166 # type: sq_string
167 # elements: 1
168 # length: 41
169  col = checker_color (R,C, checker, col)
170
171
172
173
174 # name: <cell-element>
175 # type: sq_string
176 # elements: 1
177 # length: 9
178 data2vrml
179
180
181 # name: <cell-element>
182 # type: sq_string
183 # elements: 1
184 # length: 284
185  s = data2vrml (typeStr, value) - Convert 'value' to VRML code of type typeStr
186
187  TODO: Improve this function
188
189  If typeStr is "SFBool",   then s is "TRUE" or "FALSE"
190  If typeStr is "MFString", then s is sprintf ("%s", value)
191  otherwise                      s is sprintf ("%f", value)
192
193
194
195
196 # name: <cell-element>
197 # type: sq_string
198 # elements: 1
199 # length: 79
200  s = data2vrml (typeStr, value) - Convert 'value' to VRML code of type typeStr
201
202
203
204
205 # name: <cell-element>
206 # type: sq_string
207 # elements: 1
208 # length: 7
209 proplan
210
211
212 # name: <cell-element>
213 # type: sq_string
214 # elements: 1
215 # length: 82
216        x = proplan(x,d,v=1)
217
218  orthogonally project x to the affine plane d*x == v
219
220
221
222 # name: <cell-element>
223 # type: sq_string
224 # elements: 1
225 # length: 28
226        x = proplan(x,d,v=1)
227
228
229
230
231 # name: <cell-element>
232 # type: sq_string
233 # elements: 1
234 # length: 9
235 save_vrml
236
237
238 # name: <cell-element>
239 # type: sq_string
240 # elements: 1
241 # length: 404
242  save_vrml(outname,[options],s1,...)    - Save vrml code
243  
244  Makes a vrml2 file from strings of vrml code. A "background" node is
245  added.
246  
247  Options :
248  "nobg"
249  "nolight"
250  
251  Bugs :
252  - "outname" should not contain the substring ".wrl" anywhere else
253    than as a suffix.
254  - "outname" should only contain the character ">" as ">>" at the
255    beginning , to indicate append rather than overwriting the
256    file.
257
258
259
260 # name: <cell-element>
261 # type: sq_string
262 # elements: 1
263 # length: 33
264  save_vrml(outname,[options],s1,.
265
266
267
268 # name: <cell-element>
269 # type: sq_string
270 # elements: 1
271 # length: 16
272 test_moving_surf
273
274
275 # name: <cell-element>
276 # type: sq_string
277 # elements: 1
278 # length: 36
279 key test_moving_surf
280
281  Test vmesh.m
282
283
284
285 # name: <cell-element>
286 # type: sq_string
287 # elements: 1
288 # length: 21
289 key test_moving_surf
290
291
292
293
294 # name: <cell-element>
295 # type: sq_string
296 # elements: 1
297 # length: 10
298 test_vmesh
299
300
301 # name: <cell-element>
302 # type: sq_string
303 # elements: 1
304 # length: 30
305 key test_vmesh
306
307  Test vmesh.m
308
309
310
311 # name: <cell-element>
312 # type: sq_string
313 # elements: 1
314 # length: 15
315 key test_vmesh
316
317
318
319
320 # name: <cell-element>
321 # type: sq_string
322 # elements: 1
323 # length: 15
324 test_vrml_faces
325
326
327 # name: <cell-element>
328 # type: sq_string
329 # elements: 1
330 # length: 46
331  Test that vrml_faces works with "tex" option
332
333
334
335 # name: <cell-element>
336 # type: sq_string
337 # elements: 1
338 # length: 46
339  Test that vrml_faces works with "tex" option
340
341
342
343
344 # name: <cell-element>
345 # type: sq_string
346 # elements: 1
347 # length: 5
348 vmesh
349
350
351 # name: <cell-element>
352 # type: sq_string
353 # elements: 1
354 # length: 2329
355  s = vmesh (x, y, z [, options] ) - Visualize a 3D surface
356  s = vmesh (z [, options] )
357
358  Visualizes a 3D surface. Returns the VRML code.
359
360  x : RxC or C  : X coordinates of the points on the surface
361  y : RxC or R  : Y "                                      "
362  z : RxC       : Z "                                      "
363
364  s :   string  : The code
365
366  If x and y are omitted, they are assumed to be linspace(-1,1,C or R).
367  Points presenting one or more 'inf' or 'nan' coordinates are ignored.
368
369  Options : (all options of vrml_surf may be used too)
370
371  "col" , col  : 3      : RGB Color,                Default = [0.3,0.4,0.9]
372              or 3x(R*C): Color of vertices (vrml colorPerVertex is TRUE).
373              or 3x((R-1)*(C-1))
374                        : Color of facets
375              or 1      : Reflectivity (equivalent to [col,col,col] in RGB)
376              or R x C  : Reflectivity of vertices
377              or 1x(R*C)
378              or (R-1)x(C-1)
379              or (R-1)*(C-1)
380                        : Reflectivity of facets.
381
382         RGB and reflectivity values should be in the [0,1] interval.
383
384  "checker", c : 1x2 : Color as a checker. If c(1) is positive, checker has
385                       c(1) rows. If it is negative, each checker row is
386                       c(1) facets high. c(2) does the same for columns.
387              or 1x1 : Same as [c,c].
388
389  "zgray"            : Color varies from black for lowest point to white
390                       for highest.
391
392  "zrb"              : Color varies from blue for lowest point to red for
393                       highest.
394
395  "zcol", zcol : Mx3 : Color is linearly interpolated between the RGB
396                       values specified by the rows of zcol.
397
398  "steps"            : Represent surface as a piecewise constant Z = f(X,Y)
399                       function
400
401  "bars"             : Represent surface as a bar plot
402  "bwid"             : Bar width, relative to point separation. Default = 2/3
403
404  "level", l   : 1xN : Display one or more horizontal translucent plane(s)
405
406                         z == l(i)   (1 <= i <= length(l))
407  
408  "lcol", lc   : Nx3 : Color of the plane(s).          Default = [.7 .7 .7]
409  "ltran",lt   : Nx1 : Transparency of the plane(s).   Default =        0.3
410  "tex", texFile
411
412  "normalize"  :       Normalize z to [-1,1]
413
414  See also: vrml_surf(), vrml_faces(), demo("vmesh")
415
416
417
418 # name: <cell-element>
419 # type: sq_string
420 # elements: 1
421 # length: 80
422  s = vmesh (x, y, z [, options] ) - Visualize a 3D surface
423  s = vmesh (z [, opti
424
425
426
427 # name: <cell-element>
428 # type: sq_string
429 # elements: 1
430 # length: 15
431 vrml_Background
432
433
434 # name: <cell-element>
435 # type: sq_string
436 # elements: 1
437 # length: 610
438   s = vrml_Background (...)   - Vrml Background node
439   
440   s is a string of the form :
441   ------------------------------------------------------------------
442   Background { 
443     skyColor          [0 0 0]
444     skyAngle          [0]   
445     groundColor       [0 0 0]   
446     groundangle       [0]   
447     backUrl           ""
448     bottomUrl         ""
449     frontUrl          ""
450     leftUrl           ""
451     rightUrl          ""
452     topUrl            ""
453   }
454   ------------------------------------------------------------------
455
456  Options :
457  All the fields of the node
458
459  Example : s = vrml_Background ("skyColor",[0 0 1]);
460
461
462
463
464 # name: <cell-element>
465 # type: sq_string
466 # elements: 1
467 # length: 24
468   s = vrml_Background (.
469
470
471
472 # name: <cell-element>
473 # type: sq_string
474 # elements: 1
475 # length: 8
476 vrml_Box
477
478
479 # name: <cell-element>
480 # type: sq_string
481 # elements: 1
482 # length: 189
483  s = vrml_Box (sz) - Box { ... } node
484
485  If sz is not given, returns Box { }
486  If sz has size 1, returns   Box { <sz> <sz> <sz> }
487  If sz has size 3, returns   Box { <sz(1)> <sz(2)> <sz(3)> }
488
489
490
491 # name: <cell-element>
492 # type: sq_string
493 # elements: 1
494 # length: 28
495  s = vrml_Box (sz) - Box { .
496
497
498
499 # name: <cell-element>
500 # type: sq_string
501 # elements: 1
502 # length: 21
503 vrml_DirectionalLight
504
505
506 # name: <cell-element>
507 # type: sq_string
508 # elements: 1
509 # length: 617
510   s = vrml_DirectionalLight (...)   - Vrml DirectionalLight node
511
512   s is a string of the form :
513   ------------------------------------------------------------------
514   DirectionalLight { 
515     exposedField SFFloat ambientIntensity  0        # [0,1]
516     exposedField SFColor color             1 1 1    # [0,1]
517     exposedField SFVec3f direction         0 0 -1   # (-,)
518     exposedField SFFloat intensity         1        # [0,1]
519     exposedField SFBool  on                TRUE 
520   }
521   ------------------------------------------------------------------
522
523  Options :
524  All the fields of the node
525
526  See also : vrml_PointLight
527
528
529
530 # name: <cell-element>
531 # type: sq_string
532 # elements: 1
533 # length: 30
534   s = vrml_DirectionalLight (.
535
536
537
538 # name: <cell-element>
539 # type: sq_string
540 # elements: 1
541 # length: 15
542 vrml_PointLight
543
544
545 # name: <cell-element>
546 # type: sq_string
547 # elements: 1
548 # length: 791
549   s = vrml_PointLight (...)   - Vrml PointLight node
550   
551   s is a string of the form :
552   ------------------------------------------------------------------
553   PointLight { 
554     exposedField SFFloat ambientIntensity  0       ## [0,1]
555     exposedField SFVec3f attenuation       1 0 0   ## [0,inf)
556     exposedField SFColor color             1 1 1   ## [0,1]
557     exposedField SFFloat intensity         1       ## [0,1]
558     exposedField SFVec3f location          0 0 0   ## (-inf,inf)
559     exposedField SFBool  on                TRUE 
560     exposedField SFFloat radius            100     ## [0,inf)
561   }
562   ------------------------------------------------------------------
563
564  Options :
565  All the fields of the node
566
567  Example : s = vrml_PointLight ("location",[0 0 1]);
568
569  See also : vrml_DirectionalLight
570
571
572
573 # name: <cell-element>
574 # type: sq_string
575 # elements: 1
576 # length: 24
577   s = vrml_PointLight (.
578
579
580
581 # name: <cell-element>
582 # type: sq_string
583 # elements: 1
584 # length: 10
585 vrml_ROUTE
586
587
588 # name: <cell-element>
589 # type: sq_string
590 # elements: 1
591 # length: 32
592  vrml_ROUTE (eventout, eventin)
593
594
595
596 # name: <cell-element>
597 # type: sq_string
598 # elements: 1
599 # length: 32
600  vrml_ROUTE (eventout, eventin)
601
602
603
604
605 # name: <cell-element>
606 # type: sq_string
607 # elements: 1
608 # length: 11
609 vrml_Sphere
610
611
612 # name: <cell-element>
613 # type: sq_string
614 # elements: 1
615 # length: 52
616  s = vrml_Sphere (radius) - VRML code for a sphere 
617
618
619
620 # name: <cell-element>
621 # type: sq_string
622 # elements: 1
623 # length: 52
624  s = vrml_Sphere (radius) - VRML code for a sphere 
625
626
627
628
629 # name: <cell-element>
630 # type: sq_string
631 # elements: 1
632 # length: 15
633 vrml_TimeSensor
634
635
636 # name: <cell-element>
637 # type: sq_string
638 # elements: 1
639 # length: 913
640   s = vrml_TimeSensor (...)   - Low-level vrml TimeSensor node
641   
642   s is a vrml node with possible fields :
643   ------------------------------------------------------------------
644  TimeSensor { 
645    exposedField SFTime   cycleInterval 1       # (0,inf)
646    exposedField SFBool   enabled       TRUE
647    exposedField SFBool   loop          FALSE
648    exposedField SFTime   startTime     0       # (-inf,inf)
649    exposedField SFTime   stopTime      0       # (-inf,inf)
650    eventOut     SFTime   cycleTime
651    eventOut     SFFloat  fraction_changed      # [0, 1]
652    eventOut     SFBool   isActive
653    eventOut     SFTime   time
654  }
655   ------------------------------------------------------------------
656
657  Options :
658  Beyond all the fields of the node, it is also possible to use the option
659
660  "DEF", name : The created node will be preceded by 'DEF name ', so that
661                it is further possible to refer to it.
662
663  See also : 
664
665
666
667 # name: <cell-element>
668 # type: sq_string
669 # elements: 1
670 # length: 24
671   s = vrml_TimeSensor (.
672
673
674
675 # name: <cell-element>
676 # type: sq_string
677 # elements: 1
678 # length: 14
679 vrml_Viewpoint
680
681
682 # name: <cell-element>
683 # type: sq_string
684 # elements: 1
685 # length: 765
686   s = vrml_Viewpoint (...)   - Vrml Viewpoint node
687   
688   s is a string of the form :
689   ------------------------------------------------------------------
690  Viewpoint { 
691     eventIn      SFBool     set_bind
692     exposedField SFFloat    fieldOfView    0.785398  # (0,pi)
693     exposedField SFBool     jump           TRUE
694     exposedField SFRotation orientation    0 0 1 0   # [-1,1],(-pi,pi)
695     exposedField SFVec3f    position       0 0 10    # (-,)
696     field        SFString   description    ""
697     eventOut     SFTime     bindTime
698     eventOut     SFBool     isBound
699   }
700   ------------------------------------------------------------------
701
702  Options :
703  All the fields of the node
704
705  Example : s = vrml_Viewpoint ("location",[0 0 1]);
706
707  See also : vrml_DirectionalLight
708
709
710
711 # name: <cell-element>
712 # type: sq_string
713 # elements: 1
714 # length: 23
715   s = vrml_Viewpoint (.
716
717
718
719 # name: <cell-element>
720 # type: sq_string
721 # elements: 1
722 # length: 9
723 vrml_anim
724
725
726 # name: <cell-element>
727 # type: sq_string
728 # elements: 1
729 # length: 168
730  s = vrml_anim (typ, val, eventin, time)
731
732  Assemble 
733  - an interpolator of type typ, with values val
734  - a TimeSensor with period time
735  and route the event to eventin
736  
737
738
739
740 # name: <cell-element>
741 # type: sq_string
742 # elements: 1
743 # length: 41
744  s = vrml_anim (typ, val, eventin, time)
745
746
747
748
749 # name: <cell-element>
750 # type: sq_string
751 # elements: 1
752 # length: 10
753 vrml_arrow
754
755
756 # name: <cell-element>
757 # type: sq_string
758 # elements: 1
759 # length: 827
760  s = vrml_arrow (sz, col)     - Arrow pointing in "y" direction
761
762  INPUT :
763  -------
764  Arguments are optional. NaN's are replaced by default values.
765                                                          <default>
766  sz = [len, alen, dc, dr] has size 1, 2, 3 or 4, where
767
768    len  : total length                                   <1>
769    alen : If positive: length of cone/total length       <1/4>
770           If negative: -(length of cone)
771    dc   : If positive: diameter of cone base/total len   <1/16>
772           If negative: -(diameter of cone) 
773    dr   : If positive: diameter of rod/total length      <min(dc, len/32)>
774           If negative: -(diameter of rod) 
775
776  col    : 3 or 3x2 : Color of body and cone              <[0.3 0.4 0.9]>
777
778  OUTPUT :
779  --------
780  s      : string   : vrml representation of an arrow (a rod and a cone)
781
782
783
784 # name: <cell-element>
785 # type: sq_string
786 # elements: 1
787 # length: 64
788  s = vrml_arrow (sz, col)     - Arrow pointing in "y" direction
789
790
791
792
793 # name: <cell-element>
794 # type: sq_string
795 # elements: 1
796 # length: 11
797 vrml_browse
798
799
800 # name: <cell-element>
801 # type: sq_string
802 # elements: 1
803 # length: 1134
804   p = vrml_browse ([s])       - View vrml code s with FreeWRL
805       vrml_browse ("-kill")   - Kill the browser
806
807  s : string : VRML code, as returned by the vrml_XYZ functions. 
808               If  s  is not specified, a sombrero is showed
809
810  p : int    : pid of the current browser. If freewrl has not been started
811               or has died, a new one is started. p is zero or negative in
812               case of failure to start freewrl.
813
814  Some keystrokes for FreeWRL (more in the freewrl manpage) :
815
816  'e'   : Examine : mouse 1 and drag rotates the scene
817                    mouse 3 and drag moves closer/farther          
818  'w'   : Walk    : mouse 1 and drag moves for/backward, turns
819                    mouse 3 and drag translates parallel to the screen
820  's'   : Save a snapshot in files 'octave.snapshot.NNNN.ppm'
821  'q'   : Quit
822  
823  WARNING : FreeWRL >0.25 (http://www.crc.ca/FreeWRL/) must be installed.
824
825  BUG     : The vrml browser is not killed when octave exits. Sometimes the
826            vrml browser does not get raised or gets raised improperly
827            (shows the contents of the topmost window above it). Use
828            "-kill".
829
830
831
832 # name: <cell-element>
833 # type: sq_string
834 # elements: 1
835 # length: 80
836   p = vrml_browse ([s])       - View vrml code s with FreeWRL
837       vrml_browse 
838
839
840
841 # name: <cell-element>
842 # type: sq_string
843 # elements: 1
844 # length: 8
845 vrml_cyl
846
847
848 # name: <cell-element>
849 # type: sq_string
850 # elements: 1
851 # length: 698
852        s = vrml_cyl(x,...) 
853
854  Makes a cylinder that links x(:,1) to x(:,2) 
855  
856  Options : 
857
858  "tran", transparency    : Transparency                  default = 0
859  "col" , col             : Color           default = [ 0.3 0.4 0.9 ]
860  "rad" , radius          : Radius of segments         default = 0.05
861  "balls"                 : Add balls to extremities
862  "brad"                  : Radius of balls             default = rad
863  "emit", bool            : Use or not emissiveColor
864  "noemit"                : Same as emit,0
865  "arrow"                 : Last segment is an arrow 
866  "hcol", hcol            : Set color of the head of the arrow.
867                                                        default = col
868
869
870
871 # name: <cell-element>
872 # type: sq_string
873 # elements: 1
874 # length: 23
875        s = vrml_cyl(x,.
876
877
878
879 # name: <cell-element>
880 # type: sq_string
881 # elements: 1
882 # length: 20
883 vrml_demo_tutorial_1
884
885
886 # name: <cell-element>
887 # type: sq_string
888 # elements: 1
889 # length: 11
890  Listing 1
891
892
893
894 # name: <cell-element>
895 # type: sq_string
896 # elements: 1
897 # length: 11
898  Listing 1
899
900
901
902
903 # name: <cell-element>
904 # type: sq_string
905 # elements: 1
906 # length: 20
907 vrml_demo_tutorial_2
908
909
910 # name: <cell-element>
911 # type: sq_string
912 # elements: 1
913 # length: 11
914  Listing 2
915
916
917
918 # name: <cell-element>
919 # type: sq_string
920 # elements: 1
921 # length: 11
922  Listing 2
923
924
925
926
927 # name: <cell-element>
928 # type: sq_string
929 # elements: 1
930 # length: 20
931 vrml_demo_tutorial_3
932
933
934 # name: <cell-element>
935 # type: sq_string
936 # elements: 1
937 # length: 11
938  Listing 3
939
940
941
942 # name: <cell-element>
943 # type: sq_string
944 # elements: 1
945 # length: 11
946  Listing 3
947
948
949
950
951 # name: <cell-element>
952 # type: sq_string
953 # elements: 1
954 # length: 20
955 vrml_demo_tutorial_4
956
957
958 # name: <cell-element>
959 # type: sq_string
960 # elements: 1
961 # length: 11
962  Listing 4
963
964
965
966 # name: <cell-element>
967 # type: sq_string
968 # elements: 1
969 # length: 11
970  Listing 4
971
972
973
974
975 # name: <cell-element>
976 # type: sq_string
977 # elements: 1
978 # length: 14
979 vrml_ellipsoid
980
981
982 # name: <cell-element>
983 # type: sq_string
984 # elements: 1
985 # length: 272
986        v = vrml_ellipsoid (moment, col) - Ellipsoid 
987
988  moment : 3x3 : Define elipsoid by x'*moment*x = 1
989   or      3   :  use diag(moment)
990   or      1   :  use diag(moment([1,1,1]))   default : eye(3)
991
992  col    : 3   : Color                        default : [0.3 0.4 0.9]
993
994
995
996
997 # name: <cell-element>
998 # type: sq_string
999 # elements: 1
1000 # length: 53
1001        v = vrml_ellipsoid (moment, col) - Ellipsoid 
1002
1003
1004
1005
1006 # name: <cell-element>
1007 # type: sq_string
1008 # elements: 1
1009 # length: 10
1010 vrml_faces
1011
1012
1013 # name: <cell-element>
1014 # type: sq_string
1015 # elements: 1
1016 # length: 2071
1017  s = vrml_faces(x,f,...) - VRML facet object (IndexedFaceSet node)
1018
1019  x : 3xP   : The 3D points
1020  f : 3xQ   : The indexes of the points forming the faces. Indexes
1021              should have values in 1:P.
1022
1023  Returns a Shape -> IndexedFaceSet vrml node.
1024
1025  No check is done on anything
1026
1027  Options :
1028  
1029  "col" , col  : 3   : Color,                      default = [0.3,0.4,0.9]
1030              or 3xP : Color of vertices
1031              or 3xQ : Color of facets   (use "colorPerVertex" below to
1032                                          disambiguate the case P==Q).
1033  
1034  "emit", em   : 3   : Emissive color of the surface
1035               : 3XP : (same as color)
1036               : 3xQ :
1037               : 1   : Use color as emissive color too         default = 0
1038
1039  "tran", tran : 1x1 : Transparency,                           default = 0
1040
1041  "creaseAngle", a 
1042               :  1  : vrml creaseAngle value. The browser may smoothe the
1043                       crease between facets whose angle is less than a.
1044                                                               default = 0
1045  "tex", texfile 
1046               : string : Name of file containing texture.   default : none
1047
1048  "imsz", sz   : 2   : Size of texture image 
1049                                        default is determined by imginfo()
1050
1051  "tcoord", tcoord
1052               : 2x3Q : Coordinates of vertices in texture image. Each 2x3
1053                        block contains coords of one facet's corners. The
1054                        coordinates should be in [0,1], as in a VRML
1055                        TextureCoordinate node.
1056                                        default assumes faces are returned
1057                                        by extex()
1058
1059  "smooth"           : same as "creaseAngle",pi.
1060  "convex"
1061  "colorPerVertex", c: If 1, col specifies color of vertices. If 0,
1062                        col specifies color of facets.         Default = 1
1063
1064  "DEFcoord",n : string : DEF the coord VRML node with name n. Default = ''
1065  "DEFcol",  n : string : DEF the color VRML node with name n. Default = ''
1066
1067  See also: vrml_surf(), vmesh(), test_vrml_faces()
1068
1069
1070
1071 # name: <cell-element>
1072 # type: sq_string
1073 # elements: 1
1074 # length: 21
1075  s = vrml_faces(x,f,.
1076
1077
1078
1079 # name: <cell-element>
1080 # type: sq_string
1081 # elements: 1
1082 # length: 12
1083 vrml_flatten
1084
1085
1086 # name: <cell-element>
1087 # type: sq_string
1088 # elements: 1
1089 # length: 497
1090  s = vrml_flatten (x [, d, w, col]) - A planar surface containing x
1091
1092  If the points  x  are not coplanar (or not in the affine plane {y|d'*y==w}),
1093  the surface will not contain the points, but rather their projections on
1094  the plane {y|d'*y==w}.
1095  
1096  x   : 3 x P  : 3D points
1097  d   : 3      : normal to plane    | Default : given by best_dir()
1098  w   : 1      : intercept of plane |
1099  col : 3      : RGB color            Default : [0.3,0.4,0.9]
1100
1101  s   : string : vrml code representing the planar surface
1102
1103
1104
1105 # name: <cell-element>
1106 # type: sq_string
1107 # elements: 1
1108 # length: 68
1109  s = vrml_flatten (x [, d, w, col]) - A planar surface containing x
1110
1111
1112
1113
1114 # name: <cell-element>
1115 # type: sq_string
1116 # elements: 1
1117 # length: 10
1118 vrml_frame
1119
1120
1121 # name: <cell-element>
1122 # type: sq_string
1123 # elements: 1
1124 # length: 608
1125        v = vrml_frame (t, r, ...)
1126   
1127  t : 3      Translation                          Default : [0,0,0]
1128  r : 3x3    Matrix, or                           Default : eye(3)
1129      3      Argument for rotv
1130  OPTIONS
1131   name   : size     : function                                   : default
1132  "scale" : 3 or 1   : Length of frame's branches (including cone)   <1>
1133  "diam"  : 3 or 1   : Diameter of cone's base
1134  "col"   : 3 or 3x3 : Color of branches (may be stacked vertically) <[3 4 9]/10>
1135  "hcol"  : 3 or 3x3 : Color of head     (may be stacked vertically) <col>
1136                                                   
1137
1138
1139
1140 # name: <cell-element>
1141 # type: sq_string
1142 # elements: 1
1143 # length: 30
1144        v = vrml_frame (t, r, .
1145
1146
1147
1148 # name: <cell-element>
1149 # type: sq_string
1150 # elements: 1
1151 # length: 10
1152 vrml_group
1153
1154
1155 # name: <cell-element>
1156 # type: sq_string
1157 # elements: 1
1158 # length: 71
1159  v = vrml_group (s1, s2 ... ) - Form a group node with children s1,...
1160
1161
1162
1163 # name: <cell-element>
1164 # type: sq_string
1165 # elements: 1
1166 # length: 25
1167  v = vrml_group (s1, s2 .
1168
1169
1170
1171 # name: <cell-element>
1172 # type: sq_string
1173 # elements: 1
1174 # length: 11
1175 vrml_interp
1176
1177
1178 # name: <cell-element>
1179 # type: sq_string
1180 # elements: 1
1181 # length: 32
1182  s = vrml_interp (typ, val,...)
1183
1184
1185
1186 # name: <cell-element>
1187 # type: sq_string
1188 # elements: 1
1189 # length: 28
1190  s = vrml_interp (typ, val,.
1191
1192
1193
1194 # name: <cell-element>
1195 # type: sq_string
1196 # elements: 1
1197 # length: 9
1198 vrml_kill
1199
1200
1201 # name: <cell-element>
1202 # type: sq_string
1203 # elements: 1
1204 # length: 190
1205   p = vrml_kill ()            - Kill the current vrml browser
1206  
1207  If a vrml browser has previously been launched with vrml_browse(), it
1208  will be sent a KILL signal.
1209
1210  See also : vrml_browse.
1211
1212
1213
1214 # name: <cell-element>
1215 # type: sq_string
1216 # elements: 1
1217 # length: 80
1218   p = vrml_kill ()            - Kill the current vrml browser
1219  
1220  If a vrml brows
1221
1222
1223
1224 # name: <cell-element>
1225 # type: sq_string
1226 # elements: 1
1227 # length: 10
1228 vrml_lines
1229
1230
1231 # name: <cell-element>
1232 # type: sq_string
1233 # elements: 1
1234 # length: 289
1235  s = vrml_lines(x,f,...)
1236
1237  x : 3xP   : The 3D points
1238  f : 3xQ   : The indexes of the points forming the lines. Indexes
1239              should be in 1:P.
1240
1241  Returns a Shape -> IndexedLineSet vrml node.
1242
1243  No check is done on anything
1244
1245  Options :
1246  
1247  "col" , col  : 3x1 : Color, default = [1,0,0]
1248
1249
1250
1251 # name: <cell-element>
1252 # type: sq_string
1253 # elements: 1
1254 # length: 21
1255  s = vrml_lines(x,f,.
1256
1257
1258
1259 # name: <cell-element>
1260 # type: sq_string
1261 # elements: 1
1262 # length: 13
1263 vrml_material
1264
1265
1266 # name: <cell-element>
1267 # type: sq_string
1268 # elements: 1
1269 # length: 266
1270   s = vrml_material (dc,ec,tr) - Returns a "material" vrml node
1271
1272  dc : 3x1 : diffuseColor
1273  ec : 3x1 : emissiveColor
1274    or 1x1 : use dc as emissiveColor if ec is true.             Default = 0
1275  tr : 1x1 : transparency                                       Default = 0
1276
1277
1278
1279 # name: <cell-element>
1280 # type: sq_string
1281 # elements: 1
1282 # length: 64
1283   s = vrml_material (dc,ec,tr) - Returns a "material" vrml node
1284
1285
1286
1287
1288 # name: <cell-element>
1289 # type: sq_string
1290 # elements: 1
1291 # length: 12
1292 vrml_newname
1293
1294
1295 # name: <cell-element>
1296 # type: sq_string
1297 # elements: 1
1298 # length: 100
1299  n = vrml_newname (root)      - A name for a vrml node, starting by root
1300  
1301  vrml_newname ("-clear")
1302
1303
1304
1305 # name: <cell-element>
1306 # type: sq_string
1307 # elements: 1
1308 # length: 80
1309  n = vrml_newname (root)      - A name for a vrml node, starting by root
1310  
1311  vrml
1312
1313
1314
1315 # name: <cell-element>
1316 # type: sq_string
1317 # elements: 1
1318 # length: 19
1319 vrml_parallelepiped
1320
1321
1322 # name: <cell-element>
1323 # type: sq_string
1324 # elements: 1
1325 # length: 321
1326  s = vrml_parallelogram (bnds,...)
1327
1328  bnds = [xmin, ymin, zmin; xmax, ymax, zmax]
1329
1330  OPTIONS :
1331  ---------
1332  col,   c : 3x1 : Color of surface
1333  emit,  e : 1   :
1334  tran,  t : 1   :
1335
1336  border,b : 1   :
1337  bocol, c : 3   :
1338  boemit,e : 1   :
1339  borad, r : 1   :
1340
1341  balls, b : 1   :
1342  bcol,  c : 3   :
1343  bemit, e : 1   :
1344  brad,  r : 1   :
1345
1346
1347
1348 # name: <cell-element>
1349 # type: sq_string
1350 # elements: 1
1351 # length: 31
1352  s = vrml_parallelogram (bnds,.
1353
1354
1355
1356 # name: <cell-element>
1357 # type: sq_string
1358 # elements: 1
1359 # length: 18
1360 vrml_parallelogram
1361
1362
1363 # name: <cell-element>
1364 # type: sq_string
1365 # elements: 1
1366 # length: 371
1367  s = vrml_parallelogram (x,...)
1368
1369  x : 3 x 3 : Each column is a 3D point. The fourth corner is 
1370                x(:,1)-x(:,2)+x(:,3)
1371
1372  OPTIONS :
1373  ---------
1374  col,   c : 3x1 : Color of surface
1375  emit,  e : 1   :
1376  tran,  t : 1   :
1377
1378  border,b : 1   :
1379  bocol, c : 3   :
1380  boemit,e : 1   :
1381  borad, r : 1   :
1382
1383  balls, b : 1   :
1384  bcol,  c : 3   :
1385  bemit, e : 1   :
1386  brad,  r : 1   :
1387
1388
1389
1390 # name: <cell-element>
1391 # type: sq_string
1392 # elements: 1
1393 # length: 28
1394  s = vrml_parallelogram (x,.
1395
1396
1397
1398 # name: <cell-element>
1399 # type: sq_string
1400 # elements: 1
1401 # length: 11
1402 vrml_points
1403
1404
1405 # name: <cell-element>
1406 # type: sq_string
1407 # elements: 1
1408 # length: 1462
1409         s = vrml_points(x,options)
1410  
1411  x : 3xP  : 3D points
1412
1413  Makes a vrml2 "point [ ... ]" node from a 3xP matrix x.
1414  
1415  OPTIONS (name and size/type, if applicable):
1416  ---------------------------------------
1417  "balls"      : Displays spheres rather than points. Overrides the
1418                 "hide" options and no Coordinate node is defined;makes
1419                 "name" ineffective.
1420
1421  "boxes" or
1422  "cubes"      : Displays cubes rather than points. Overrides the "hide"
1423                 options and no Coordinate node is defined;makes "name"
1424                 ineffective. 
1425
1426  "rad", 1 or P: Radius of balls/size of cubes.              default = 0.1
1427
1428  "nums"       : Displays numbers rather than points. Overrides the
1429                 "hide" options and no Coordinate node is defined;
1430                 makes "name" ineffective.
1431
1432        WARNING : This option seems to make freewrl 0.34 hang, so that it
1433                  is necessary to kill it (do vrml_browse ("-kill")). Other
1434                  browsers can can view the code produced by this option.
1435
1436   "col", 3x1  : Points will have RGB col.          default = [0.3,0.4,0.9]
1437       or 3xP  : The color of each point.
1438   "tran", 1x1 : Transparency                                   default = 0
1439   "emit", e   : Use or not emissiveColor                       default = 1
1440
1441  "name", str  : The Coordinate node will be called name
1442                 (default="allpoints").
1443  "hide"       : The points will be defined, but not showed.
1444
1445
1446
1447 # name: <cell-element>
1448 # type: sq_string
1449 # elements: 1
1450 # length: 59
1451         s = vrml_points(x,options)
1452  
1453  x : 3xP  : 3D points
1454
1455
1456
1457
1458 # name: <cell-element>
1459 # type: sq_string
1460 # elements: 1
1461 # length: 9
1462 vrml_surf
1463
1464
1465 # name: <cell-element>
1466 # type: sq_string
1467 # elements: 1
1468 # length: 2206
1469  s = vrml_surf (x, y, z [, options] ) - code for a VRML surface
1470  s = vrml_surf (z [, options] )
1471
1472  Returns vrml97 code for a Shape -> IndexedFaceSet node representing a
1473  surface passing through the given points.
1474
1475  x : RxC or C  : X coordinates of the points on the surface
1476  y : RxC or R  : Y "                                      "
1477  z : RxC       : Z "                                      "
1478
1479  s :   string  : The code
1480
1481  If x and y are omitted, they are assumed to be linspace(-1,1,C or R).
1482  Points presenting one or more 'inf' or 'nan' coordinates are ignored.
1483
1484  Options :
1485
1486  "col" , col  : 3      : RGB Color,                default = [0.3,0.4,0.9]
1487              or 3x(R*C): Color of vertices (vrml colorPerVertex is TRUE).
1488              or 3x((R-1)*(C-1))
1489                        : Color of facets
1490              or 1      : Reflectivity (equivalent to [col,col,col] in RGB)
1491              or R x C  : Reflectivity of vertices
1492              or 1x(R*C)
1493              or (R-1)x(C-1)
1494              or (R-1)*(C-1)
1495                        : Reflectivity of facets.
1496
1497         RGB and reflectivity values should be in the [0,1] interval.
1498
1499  "checker", c : 1x2 : Color as a checker. If c(1) is positive, checker has
1500             c(1) rows. If it is negative, each checker row is c(1) facets
1501             high c(2) likewise determines width of checker columns.
1502  "checker", c : 1x1 : Same as [c,c].
1503
1504  "zcol", zc   : 3xN : Specify a colormap. The color of each vertex is
1505             interpolated according to its height (z).
1506
1507  "zgray"      : Black-to-white colormap. Same as "zcol", [0 1;0 1;0 1].
1508
1509  "zrb"        : Red-to-blue. Same as "zcol", [0 7 10;0 0 2;7 19 2]/10.
1510
1511  "steps"      : Represent surface as a piecewise constant Z = f(X,Y) function
1512
1513  "bars"       : Represent surface as a bar plot
1514
1515  "tran", tran : 1x1    : Transparency,                        default = 0
1516
1517  "creaseAngle", a
1518               : 1      : vrml creaseAngle The browser may smoothe the fold
1519                          between facets forming an angle less than a.
1520                                                               default = 0
1521  "smooth"           : same as "creaseAngle",pi.
1522  "tex", texFile 
1523
1524  See also: vmesh(), vrml_faces(), test_moving_surf()
1525
1526
1527
1528 # name: <cell-element>
1529 # type: sq_string
1530 # elements: 1
1531 # length: 80
1532  s = vrml_surf (x, y, z [, options] ) - code for a VRML surface
1533  s = vrml_surf (
1534
1535
1536
1537 # name: <cell-element>
1538 # type: sq_string
1539 # elements: 1
1540 # length: 9
1541 vrml_text
1542
1543
1544 # name: <cell-element>
1545 # type: sq_string
1546 # elements: 1
1547 # length: 533
1548        s = vrml_text(t,...) 
1549
1550  Makes vrml Shape node representing string t
1551  
1552  Options : 
1553
1554  "col" , col             : default = [ 0.3 0.4 0.9 ]
1555  "size" , size           : default = 1.0
1556  "family", family        : default = "SERIF". 
1557                            (could also be : "TYPEWRITER", "SANS")
1558  "style", style          : default = "PLAIN". 
1559                            (could also be : "BOLD", "ITALIC", "BOLDITALIC")
1560  "justify", justify      : default = "MIDDLE"
1561                            (could also be "FIRST", "BEGIN", "END")
1562
1563
1564
1565 # name: <cell-element>
1566 # type: sq_string
1567 # elements: 1
1568 # length: 24
1569        s = vrml_text(t,.
1570
1571
1572
1573 # name: <cell-element>
1574 # type: sq_string
1575 # elements: 1
1576 # length: 15
1577 vrml_thick_surf
1578
1579
1580 # name: <cell-element>
1581 # type: sq_string
1582 # elements: 1
1583 # length: 1178
1584        s = vrml_thick_surf (x, y, z [, options] )
1585        s = vrml_thick_surf (z [, options] )
1586
1587  Returns vrml97 code for a Shape -> IndexedFaceSet node representing a
1588  surface passing through the given points.
1589
1590  The surface may look smoother than that returned by  vrml_surf,  but it
1591  has twice as many facets.
1592
1593  x : RxC or C  : X coordinates of the points on the surface
1594  y : RxC or R  : Y "                                      "
1595  z : RxC       : Z "                                      "
1596
1597  s :   string  : The code
1598
1599  If x and y are omitted, they are assumed to be 1:C and 1:R, resp
1600  Points presenting one or more 'inf' or 'nan' coordinates are ignored.
1601
1602  Options :
1603
1604  "col" , col  : 3   : Color,                      default = [0.3,0.4,0.9]
1605              or 3xP : color of vertices (vrml colorPerVertex is TRUE).
1606  
1607  "tran", tran : 1x1 : Transparency,                           default = 0
1608
1609  "creaseAngle", a 
1610               :  1  : vrml creaseAngle value. The browser may smoothe the
1611                       crease between facets whose angle is less than a.
1612                                                               default = 0
1613  "smooth"           : same as "creaseAngle",pi.
1614
1615
1616
1617 # name: <cell-element>
1618 # type: sq_string
1619 # elements: 1
1620 # length: 80
1621        s = vrml_thick_surf (x, y, z [, options] )
1622        s = vrml_thick_surf (z 
1623
1624
1625
1626 # name: <cell-element>
1627 # type: sq_string
1628 # elements: 1
1629 # length: 12
1630 vrml_transfo
1631
1632
1633 # name: <cell-element>
1634 # type: sq_string
1635 # elements: 1
1636 # length: 483
1637        v = vrml_transfo(s,t,r,c,d)
1638   
1639  s : string of vrml code.
1640  t : 3      Translation                          default : [0,0,0]
1641  r : 3x3    Rotation matrix, or                  default : eye(3)
1642      3      Scaled rotation axis.
1643  c : 3 or 1 Scale                                default : 1
1644  d : string DEF name                             default : ''
1645
1646  v : string v is s, enclosed in a Transform {} vrml node with
1647      rotation, translation and scale params given by r, t and c.
1648
1649
1650
1651
1652 # name: <cell-element>
1653 # type: sq_string
1654 # elements: 1
1655 # length: 63
1656        v = vrml_transfo(s,t,r,c,d)
1657   
1658  s : string of vrml code.
1659
1660
1661
1662
1663