Series of unconnected triangles

39 views
Skip to first unread message

Matthew Turk

unread,
Sep 13, 2011, 3:56:28 PM9/13/11
to part...@googlegroups.com
Hi all,

I have a set of triangles, divvied up into groups of three vertices
each, that I'd like to plot. It seems the 'mesh' command in partiview
is the way to do this, but what I'm running into is that I'd like the
final vertex not to be connected to the subsequent vertex. Is there a
'skip' command or other way to suppress this connection? Or should I
be creating lots of 4-vertex meshes, with first&final repeated?

Thanks very much,

Matt

Stuart Levy

unread,
Sep 13, 2011, 4:43:58 PM9/13/11
to part...@googlegroups.com
Hey Matt,

Given partiview's current capabilities, rather than a "mesh", it'd be best
to use a "waveobj", wavefront-format object (though it should also work to
make a pile of degenerate meshes as you describe).

You'd gather up all the vertices of all the triangles into one big list,
then add a list of faces which refer to triples of vertices. Put this
in a separate file, maybe "triangles.obj", and then use
waveobj [-c <colorindex>] [-tx <textureindex>] triangles.obj

where triangles.obj might contain something like (written as plain text,
one vertex or face per line):

v x1 y1 z1 # position of vert. 1 (note that vert. indexing is 1-based)
v x2 y2 z2 # position of vert. 2
v x3 y3 z3 # position of vert. 3, etc.
v x4 y4 z4 # ...

f 1 2 3 # one triangle
f 4 5 6 # another
# ...

(You can also apply per-vertex face normals and texture coordinates as
usual in the Wavefront format. There's no support for .mtl materials though.
Use waveobj -tx <textureno> or -c <colorindex> to specify a color or texture
to apply to all the triangles. Details of "waveobj" are in the reference doc,
as in .../partiview/doc/partiview-4.html.)

> --
> You received this message because you are subscribed to the Google Groups "partiview" group.
> To post to this group, send email to part...@googlegroups.com.
> To unsubscribe from this group, send email to partiview+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/partiview?hl=en.

Matthew Turk

unread,
Sep 13, 2011, 5:01:04 PM9/13/11
to part...@googlegroups.com
Hi Stuart,

Thank you! That worked perfectly. I really appreciate it.

Best,

Matt

Reply all
Reply to author
Forward
0 new messages