s = vrml_faces(x,f,...) - VRML facet object (IndexedFaceSet node)
x : 3xP : The 3D points
f : 3xQ : The indexes of the points forming the faces. Indexes
should have values in 1:P.
Returns a Shape -> IndexedFaceSet vrml node.
No check is done on anything
Options :
"col" , col : 3 : Color, default = [0.3,0.4,0.9]
or 3xP : Color of vertices
or 3xQ : Color of facets (use "colorPerVertex" below to
disambiguate the case P==Q).
"emit", em : 3 : Emissive color of the surface
: 3XP : (same as color)
: 3xQ :
: 1 : Use color as emissive color too default = 0
"tran", tran : 1x1 : Transparency, default = 0
"creaseAngle", a
: 1 : vrml creaseAngle value. The browser may smoothe the
crease between facets whose angle is less than a.
default = 0
"tex", texfile
: string : Name of file containing texture. default : none
"imsz", sz : 2 : Size of texture image
default is determined by imginfo()
"tcoord", tcoord
: 2x3Q : Coordinates of vertices in texture image. Each 2x3
block contains coords of one facet's corners. The
coordinates should be in [0,1], as in a VRML
TextureCoordinate node.
default assumes faces are returned
by extex()
"smooth" : same as "creaseAngle",pi.
"convex"
"colorPerVertex", c: If 1, col specifies color of vertices. If 0,
col specifies color of facets. Default = 1
"DEFcoord",n : string : DEF the coord VRML node with name n. Default = ''
"DEFcol", n : string : DEF the color VRML node with name n. Default = ''
See also: vrml_surf(), vmesh(), test_vrml_faces()
The following code
% Test the vrml_faces and vrml_browse functions with the test_vrml_faces script test_vrml_faces
Produces the following output
Going to show a tetrahedron
If nothing appears, it may be due to problems
with your FreeWRL installation
cmd = freewrl /tmp/octave_vrml_output.wrl
Press a key in this terminal when done
Going to show almost the same tetrahedron
If nothing appears, it may be due to problems
with your FreeWRL installation
cmd = freewrl /tmp/octave_vrml_output.wrl
Press a key in this terminal when done
Coloring the vertices
cmd = freewrl /tmp/octave_vrml_output.wrl
Press a key in this terminal when done
Coloring the faces
cmd = freewrl /tmp/octave_vrml_output.wrl
Press a key in this terminal when done
Package: vrml