[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: octave and 3-D shapes/meshes

From: Etienne Grossmann
Subject: Re: octave and 3-D shapes/meshes
Date: Tue, 18 Oct 2005 01:42:24 -0400
User-agent: Mutt/

  Hi Jeff,

maybe, in this case, vrml is apropriate: source forge has
vrml_faces, vrml_surf, vrml_browse and vmesh functions. I think the
1st will do what you want. If you have freewrl installed, you can use
vrml_browse to visualise your vrml object and take snapshots w the s




vrml_faces is the user-defined function from the file

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.
"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()

On Mon, Oct 17, 2005 at 07:54:25PM -0400, Jeff Abrahamson wrote:
# Does anyone have advise on working with 3-D triangulated meshes (and
# rendering the surfaces they define) from octave?  In particular, I
# want to be able to color those triangles (or edges) that my program
# decides are to be special.
# Octaviz can render surfaces based on mesh description, but coloring is
# not obvious to me.  It's very easy to use, though.
# Gri does not seem to understand easily the 3-D shading needed to make
# the mesh skin look real (as in, understandable).
# Povray seems like overkill.  (It also isn't quite as free as I'd
# like.)
# Thanks much for any suggestions.
# I asked a related question earlier today, but it was part of a larger
# very particular question that may cause this piece to be ignored by
# the wider group that might be able to provide some useful feedback.
# My apologies for the duplication.
# -- 
#  Jeff
#  Jeff Abrahamson  <>    +1 215/837-2287
#  GPG fingerprint: 1A1A BA95 D082 A558 A276  63C6 16BF 8C4C 0D1D AE4B
# -------------------------------------------------------------
# Octave is freely available under the terms of the GNU GPL.
# Octave's home on the web:
# How to fund new projects:
# Subscription information:
# -------------------------------------------------------------

Etienne Grossmann ------

Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]