What is the standard tool to display a polyhedron given xyz coordinates?

472 Views Asked by At

I have a file containing xyz coordinates of vertices of a polyhedron. What tool can open xyz file, display faces, edges and vertices as well as rotate/zoom the polyhedron? Preferably something that doesn't require fancy scripting for this task. Is there one standard tool (like Matlab), or there are other tools.

I am looking for result similar to gif images here:

http://www-wales.ch.cam.ac.uk/~wales/CCD/Thomson/table.html

XYZ file itself looks like this

4.71e-01 8.66e-01 1.70e-01
-5.07e-01 8.45e-01 1.70e-01
1.85e-10 7.49e-11 1.00e+00
-4.71e-01 -8.66e-01 1.70e-01
..

1

There are 1 best solutions below

0
On BEST ANSWER

Antiprism is a suite of programs which can visualize and manipulate polyhedra. I think it meets the lightweight, standalone criteria you're looking for.

The viewing program, antiview, deals with files in OFF format (see also on Wikipedia), which is also shared by other programs. This format also requires the specification of faces, because the polyhedra need not be convex.

To use your files with only the coordinates of the vertices, you can add two header lines:

OFF
# 0 0

replacing # by the number of vertices. Then use conv_hull from Antiprism to create an OFF file for the convex hull. You can do e.g.

conv_hull -o poly.off verts.off

to create a new file with all the faces, then use antiview poly.off to view it. Or

conv_hull verts.off | antiview

to pipe straight into antiview.

In fact, if you do not add the two header lines suggested above, conv_hull will assume it is a list of vertex coordinates, and it will work anyway, but print a warning.