** Next:** Function: tiling_2d
** Up:** GRASP Routines: Template Bank
** Previous:** Template Placement
** Contents**

##

Structure: `struct tile`

For routines which lay out a mesh of tiles, a convenient data
structure for keeping track of these templates is a linked list. Such
a structure allows new tiles to be added or inserted into the list,
without knowing in advance how many tiles are going to be generated.
The following structure stores data for a rectangular tile inscribed
within an ellipse; this is suitable for many tiling problems in which
the goal is to fill a two-dimensional space with some minimum density
of tiles.

`struct tile {`

`int flag;`
Error codes generated while processing this tile.

`double x;`
The horizontal position of the patch.

`double y;`
The vertical position of the patch.

`double dx;`
The horizontal width of the patch.

`double dy;`
The vertical height of the patch.

`double r1;`
The semimajor axis of the circumscribing ellipse.

`double r2;`
The semiminor axis of the circumscribing ellipse.

`double theta;`
The angle between the x and semimajor axes.

`struct tile *next;`
A pointer to the next tile in the list.

`};`

** Next:** Function: tiling_2d
** Up:** GRASP Routines: Template Bank
** Previous:** Template Placement
** Contents**
Bruce Allen
2000-11-19