XY Files
These are some examples of XY files, which are simply lists
of points in the plane.
An XY file has a simple structure. There are three kinds of records:
-
COMMENT LINES begin with the character '#' and are ignored;
-
BLANK LINES are (usually) ignored but might contain some
"connection" information;
-
COORDINATE LINES each contain one pair of X, Y coordinates;
There is a second version of XY files
in which the blank lines are interpreted to indicate which points
are connected by geometric lines.
Example XY File:
# Corners of a triangle
#
0.0 0.0
1.0 0.0
0.0 1.0
Related Data and Programs:
XY File characteristics:
-
ASCII
-
2D
-
No compression
-
1 image
Programs to create an XY file:
-
RANDOM_DATA
can produce a set of points that are randomly sampled from a
given geometric shape. In cases where this was a 2D shape, the
resulting output file is an XY file.
-
RBOX
will produce a random sample of points according to a given
distribution, and over a given geometric shape. In cases
where this was a 2D shape, then the resulting output file is
ALMOST an XY file (you just need to delete the two initial
records that list the spatial dimension and number of points.)
Programs to view an XY file:
-
PLOT_POINTS
will read an XY file and create an
Encapsulated PostScript graphics file
image of the points. It can also compute and display Voronoi
diagrams and Delaunay triangulations.
-
POINTS_01_PLOT is an interactive MATLAB program
which can read a file containing coordinates of points in the
unit square, and display an image of those points.
-
POINTS_DISPLAY_MATLAB is a MATLAB program which can read
a file of coordinates of points, and display an image of the
points in a MATLAB graphics window.
-
POINTS_DISPLAY_OPEN_GL is an interactive executable C++ program
which can read a file containing 2D point coordinates, and display
an image of those points using Open GL.
-
VORONOI_PLOT
will read an XY file (assuming that points are confined to the unit
square) and create a
PPMA graphics file image of the
Voronoi diagram of the points.
Programs to process an XY file:
Routines to read an XY file:
Routines to write an XY file:
Sample XY Files:
-
diamond_02_00009.xy,
9 points, whose Voronoi diagram includes a diamond;
-
diamond_02_00009.png,
a PNG image of the points.
-
dt_10.xy, 10 points; compute the
Delaunay triangulation;
-
dt_10.png,
a PNG image of the points.
-
dt_100.xy,
100 points for which the Delaunay triangulation is to be computed;
-
dt_100.png,
a PNG image of the points.
-
graham_10.xy,
10 points for which the convex hull is to be computed;
-
graham_10.png,
a PNG image of the points.
-
graham_19.xy,
19 points for which the convex hull is to be computed;
-
graham_19.png,
a PNG image of the points.
-
grid_49.xy, 49 points in a square grid.
-
grid_49.png,
a PNG image of the points.
-
lsup_303.xy,
303 points defining the shape of Lake Superior.
-
lsup_303.png,
a PNG image of the points.
-
points_100.xy, 100 points;
-
points_100.png,
a PNG image of the points.
-
repeats_17.xy, 17 points, some repeated;
-
repeats_17.png,
a PNG image of the points.
-
tri_12.xy, 12 points;
-
tri_12.png,
a PNG image of the points.
-
tri_18.xy, 18 points;
-
tri_18.png,
a PNG image of the points.
-
uniform_0016.xy, 16 random points
in the unit square;
-
uniform_0016.png,
a PNG image of the points.
-
uniform_0025.xy, 25 random points
in the unit square;
-
uniform_0025.png,
a PNG image of the points.
-
uniform_0036.xy, 36 random points
in the unit square;
-
uniform_0036.png,
a PNG image of the points.
-
uniform_0064.xy, 64 random points
in the unit square;
-
uniform_0064.png,
a PNG image of the points.
-
uniform_0100.xy, 100 random points
in the unit square;
-
uniform_0100.png,
a PNG image of the points.
-
uniform_0128.xy, 128 random points
in the unit square;
-
uniform_0128.png,
a PNG image of the points.
-
uniform_0256.xy, 256 random points
in the unit square;
-
uniform_0256.png,
a PNG image of the points.
You can go up one level to
the DATA page.
Last revised on 21 June 2006.