This folder contains two projects, which show how to use the code provided in
the "source" directory.

To compile the projects you need to uncompress the DevIL and Randoma libraries 
(coming in the "lib" directory") and point your C++ compiler to the appropriate
locations. With Visual C++ you can do this by clicken Tools -> Options ->
Projects -> VC++ Directories -> Include Files (resp. Library Files).

gen_tiles
---------

This project contains the full tile set creation procedure described in Sections
4 and 5 of our paper. The main.cpp should be very easy to follow.

use_tiles
---------

This project uses a tile set (e.g. created with the gen_tiles project) to create
a point set according to a density map (grayscale image). It creates three
output files in the data directory: data/output_XX.points.

The output files are point lists in a very simple format. The first 4 bytes are
an integer specifying the number of points to follow. Next, follows the list of
points. For each point there are two 4-byte floats for the x and y positions.

You can use this code to read the point list in:

void loadPoints(const char * fileName)
{
	FILE * fin = fopen(fileName, "rb");
	
	numPoints = freadi(fin);
	points = new Vec2[numPoints];
	for (int i = 0; i < numPoints; i++)
	{
		points[i].x = freadi(fin);
		points[i].y = freadi(fin);
	}
	
	fclose(fout);
}
