xy_io, a Fortran90 code which reads and writes simple graphics files in the XY, XYL and XYF formats.
XY files are a simple way of storing information about sets of points in 2D.
An XY file has a simple structure. There are three kinds of records:
Here is an example of an XY file containing 13 points:
# house.xy # 0.000000 0.000000 6.000000 0.000000 6.000000 7.000000 3.000000 10.000000 0.000000 7.000000 4.000000 1.000000 5.000000 1.000000 5.000000 4.000000 4.000000 4.000000 5.000000 8.000000 5.000000 11.000000 4.000000 11.000000 4.000000 9.000000
Of course, in many cases, we would like to describe LINES between the points. We can add this information by including a second file, called an XYL file, which consists of a string of point indices. A line is drawn from one point to the next and so on. Each list of points is on a separate record. Thus, an XYL file associated with the above XY file might be:
# house.xyl # 1 2 3 4 5 1 6 7 8 9 6 10 11 12 13
We might also like to describe FACES defined by the points. We can add this information by including a file, called an XYF file, which consists of a string of point indices. A face is defined by listing in counterclockwise order the vertices that lie on it. No terminating "-1" is needed, and the first vertex is not repeated as the final vertex. Thus, an XYF file associated with the above XY file might be:
# house.xyf # 1 2 3 4 5 6 7 8 9 10 11 12 13
The information on this web page is distributed under the MIT license.
xy_io is available in a C++ version and a Fortran90 version and a MATLAB version.
circle_arc_grid, a Fortran90 code which computes points equally spaced on a circular arc, and writes them to an XY file;
grf_to_xyl, a Fortran90 code which converts information describing the adjacency and embedding of an abstract graph from GRF to XYL format.
table, a data directory which contains examples of TABLE files, a simple format for N points in M dimensions;
xy, a data directory which contains examples of XY files, a simple 2D graphics point format;
xy_display, a MATLAB code which reads an XY file containing the coordinates of points in 2D, and displays a plot of the points in a MATLAB graphics window;
xy_display_opengl, a C++ code which reads an XY file of 2D point coordinates, and displays an image of those points using OpenGL.
xyf, a data directory which contains examples of XYF files, a simple 2D graphics point and face format;
xyf_display, a MATLAB code which reads XYF information defining points and faces in 2D, and displays an image.
xyf_display_opengl, a C++ code which reads XYF information defining points and faces in 2D, and displays an image using OpenGL.
xyl, a data directory which contains examples of XYL files, a simple 2D graphics point and line format;
xyl_display, a MATLAB code which reads XYL information defining points and lines in 2D, and displays an image.
xyl_display_opengl, a C++ code which reads XYL information defining points and lines in 2D, and displays an image using OpenGL.
xyz_io, a Fortran90 code which reads and writes XYZ files, a simple 3D graphics point format.