These are some examples of XYZL files, a simple format for recording points and lines in 3D space.
An XYZL file assumes first the existence of an XYZ file, which lists the (X,Y,Z) coordinates of points. Then the XYZL file is used to define lines by listing the indices of points in the XYZ file that are to be connected. Each record of the file can be used to define a line as a point index list.
Note that since we store a list of point indices, this raises the ticklish question of whether to use 0 or 1-based indexing. For now, either indexing scheme is acceptable, as long as it is implicitly obvious - that is, the the minimum entry should be 0, or the maximum entry should equal the number of points, from which the indexing scheme can be determined.
# Vertices of a cube
#
0.0 0.0 0.0
0.0 0.0 1.0
0.0 1.0 0.0
0.0 1.0 1.0
1.0 0.0 0.0
1.0 0.0 1.0
1.0 1.0 0.0
1.0 1.0 1.0
# cube.xyzl
#
# The indices of points in "cube.xyz" which should be connected
# to form the edges of a cube.
#
1 2 3 4 1
5 6 7 8 5
1 5
2 6
3 7
4 8
SXYZ_VORONOI is a FORTRAN90 program which computes the Voronoi diagram of points on the unit sphere. It outputs a copy of this information in XYZL format.
XYZL_DISPLAY is a MATLAB program which reads XYL information defining points and lines in 3D, and displays an image in a MATLAB graphics window.
XYZL_DISPLAY_OPEN_GL is a C++ program which reads XYZL information defining points and lines in 3D, and displays an image using OpenGL.
CUBE describes the 8 vertices of a cube.
DODECAHEDRON describes the 20 vertices of a dodecahedron.
GEN_00010 describes 10 points on the unit sphere.
GEN_00100 describes 100 points on the unit sphere.
ICOSAHEDRON describes the 12 vertices of a icosahedron.
You can go up one level to the DATA page.