next up previous
Next: Pixellated Fitting Up: Pre-Processing Strategies Previous: Pre-Processing Strategies

Edge Matching

One simple approach to agglomerating cookies into cookie groups comes from the realization that two triangular cookies can be fit together into a parallelogram. The parallelogram can then be repeated in a very space efficient manner without the need for dealing with rotations. This intuition leads to the following algorithm for joining two convex cookies into a cookie group:

  1. Find the longest edge in a cookie.
  2. Rotate a second cookie by 180 degrees, and shift it so that its longest edge overlaps the longest edge of the first cookie, with opposite endpoints touching.
  3. Compute the normal vector to the longest edge of the first cookie, and move the second cookie a distance of $ \epsilon$ in that direction. This will prevent the cookies from intersecting.



2003-10-14