Next: Pixellated Fitting
Up: Pre-Processing Strategies
Previous: Pre-Processing Strategies
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:
- Find the longest edge in a cookie.
- 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.
- Compute the normal vector to the longest edge of the first cookie, and move the second cookie a distance of
in that direction. This will prevent the cookies from intersecting.
2003-10-14