Home Overview FAQ Documentation Download Mailing List Geomview For Windows? Support Users Development Bug Reporting Contributing Contact Us Sponsors
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Closed REQ 5260]:
> > Date: Wed, 22 Feb 95 05:20:37 -0700 > From: tkim at enws346.cagd.eas.asu.edu (Tae-Wan Kim) > Message-Id: <9502221220.AA07333 at enws346.cagd.eas.asu.edu> > > Dear Sir: > > I am currently using Geomview. I like to render one object which is > made by a collection of 3D triangles with a normal vector at each vertex. > I can not find a file format for this object. > Could you please tell me the data file format for the triangle list? > If you send me a simple example data, it will help me a lot. > > Best regards, > > Tae-wan Kim > > internet: tkim at asu.edu > > Hello, There are two different formats that might suit your purposes. The first format is NQUAD (quadrilaterals with normals) where you use degenerate quads to get triangles. This is slightly less efficient that the second format but easier to generate from a program. Here's a commented two triangle example: ------------------------------------------------------------------------- NQUAD # Triangle 1 -1 0 0 0 0 1 # vertex 0 (x,y,z) (normalx, normaly, normalz) 1 0 0 0 0 1 # vertex 1 0 1.4 .3 0 0 1 # vertex 2 0 1.4 .3 0 0 1 # vertex 2 (duplicated) # Triangle 2 -1 0 0 0 0 1 # vertex 0 (x,y,z) (normalx, normaly, normalz) 1 0 0 0 0 1 # vertex 1 0 -1.4 .3 0 0 1 # vertex 3 0 -1.4 .3 0 0 1 # vertex 3 (duplicated) ------------------------------------------------------------------------- The second file format is NOFF (polylist with normals). Here we create our two triangles from a single list of vertices with indices into the list. Geomview won't actually use the normals in NOFFs for lighting calculations until you choose smooth shading mode (selectable from the appearance panel). ------------------------------------------------------------------------- NOFF 4 2 5 # 4 = number of vertices, 2 = number of triangles # 5 = number of edges (could optionally be 0 since this # value is ignored by geomview) -1 0 0 0 0 1 # vertex 0 (x,y,z) (normalx, normaly, normalz) 1 0 0 0 0 1 # vertex 1 0 1.4 .3 0 0 1 # vertex 2 0 -1.4 .3 0 0 1 # vertex 3 3 0 1 2 # Triangle 1, composed of 3 vertices (0, 1, 2) in that order 3 3 1 0 # Triangle 2, composed of 3 vertices (3, 1, 0) in that order ------------------------------------------------------------------------- hope this helps, Daeron Meyer daeron at geom.umn.edu
|
||
Home | Overview | FAQ | Documentation | Support | Download | Mailing List Windows? | Development | Bug Reporting | Contributing | Contact Us | Sponsors |
|||
site hosted by |