XY_IO
XY File Input/Output routines.


XY_IO is MATLAB library which reads and writes 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 for each point index in a 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. 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
      

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Languages:

XY_IO is available in a C++ version and a FORTRAN90 version and a MATLAB version.

Related Data and Programs:

GRF_TO_XYL, a FORTRAN90 program which converts information describing the adjacency and embedding of an abstract graph from GRF to XYL format.

XY, a data directory of examples of XY files, a simple 2D graphics point format;

XY_DISPLAY, a MATLAB program which reads a set of 2D points from a file and plots them in a the MATLAB graphics window.

XY_DISPLAY_OPENGL, a C++ program 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 program which reads XYF information defining points and faces in 2D, and displays an image using MATLAB.

XYF_DISPLAY_OPENGL, a C++ program 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 program which reads XYL information defining points and lines in 2D, and displays an image using MATLAB.

XYL_DISPLAY_OPENGL, a C++ program which reads XYL information defining points and lines in 2D, and displays an image using OpenGL.

XYZ_IO, a MATLAB library which reads and writes XYZ files, a simple 3D graphics point format.

Source Code:

Examples and Tests:


Last revised on 08 January 2009.