Jump to content

Rotating calipers: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
→‎Distances: not really used in machine learning, but a similar problem
Sytelus (talk | contribs)
Moved historical context in the its own section, clarified intro, added better citation for Shamos's thesis
Line 1: Line 1:
In [[computational geometry]], '''rotating calipers''' is a method used to construct efficient algorithms for a number of problems.
In [[computational geometry]], '''rotating calipers''' is method number of problems.


The the rotating a spring-loaded [[vernier caliper]] around the outside of a convex polygon. Every time one blade of the caliper lies flat against an edge of the polygon, it forms an [[antipodal point|antipodal pair]] with the point or edge touching the opposite blade. The complete "rotation" of the caliper around the polygon detects all antipodal pairs.
The method was first used by [[Michael Shamos]] in 1978 for determining all [[antipodal point|antipodal]] pairs of points and vertices on a [[convex polygon]].

The term "rotating calipers" was later coined in 1983 by the computer scientist [[Godfried Toussaint]],<ref>[http://www-cgrl.cs.mcgill.ca/~godfried/research/calipers.html "Rotating Calipers"] at Toussaint's home page</ref> who applied this approach to a number of other geometric problems.<ref name=tous83>{{cite journal
== History ==
Rotating calipers method was first used in the dissertation of the [[Michael Shamos]] in 1978<ref>{{Cite web|url = http://euro.ecom.cmu.edu/people/faculty/mshamos/1978ShamosThesis.pdf|title = Computational Geometry|date = 1978|accessdate = |website = |publisher = Yale University|last = Shamos|first = Michael|authorlink = Michael Shamos|pages = 76-81|format = PDF}}</ref>. The algorithm in that dissertation uses this method for generating all [[antipodal point|antipodal]] pairs of points on a [[convex polygon]] for computing the diameter of a convex polygon in <math>O(n)</math> time. [[Godfried Toussaint]] coined the phrase "rotating calipers" and also demonstrated that the method was applicable in solving many computational geometry problems involving [[Rotating calipers#Applications|wide range of areas]].<ref name="tous83">{{cite journal
| author = Toussaint, Godfried T.
| author = Toussaint, Godfried T.
| title = Solving geometric problems with the rotating calipers
| title = Solving geometric problems with the rotating calipers
Line 8: Line 10:
|url=http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.155.5671
|url=http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.155.5671
|year = 1983
|year = 1983
}}</ref>
}}</ref> The name comes from the analogy of rotating a spring-loaded [[vernier caliper]] around the outside of a convex polygon. Every time one blade of the caliper lies flat against an edge of the polygon, it forms an [[antipodal point|antipodal pair]] with the point or edge touching the opposite blade. The complete "rotation" of the caliper around the polygon detects all antipodal pairs and may be carried out in [[Linear time|O(n)]] time.<ref>M.I. Shamos. Computational geometry. PhD thesis, Yale University, 1978.</ref>


[[File:Rotating calipers, finding a bridge between two convex polygons.svg|thumb|Rotating calipers, finding a bridge between two convex polygons]]
[[File:Rotating calipers, finding a bridge between two convex polygons.svg|thumb|Rotating calipers, finding a bridge between two convex polygons]]

Revision as of 07:24, 21 June 2015

In computational geometry, rotating calipers is the method that has been found useful in solving number of problems.

The method is so named because the idea is analogous to rotating a spring-loaded vernier caliper around the outside of a convex polygon.[1]. Every time one blade of the caliper lies flat against an edge of the polygon, it forms an antipodal pair with the point or edge touching the opposite blade. The complete "rotation" of the caliper around the polygon detects all antipodal pairs.

History

Rotating calipers method was first used in the dissertation of the Michael Shamos in 1978[2]. The algorithm in that dissertation uses this method for generating all antipodal pairs of points on a convex polygon for computing the diameter of a convex polygon in time. Godfried Toussaint coined the phrase "rotating calipers" and also demonstrated that the method was applicable in solving many computational geometry problems involving wide range of areas.[3]

Rotating calipers, finding a bridge between two convex polygons

Applications

Toussaint[4] and Pirzadeh[5] describes various applications of rotating calipers method.

Distances

  • Diameter (maximum width) of a convex polygon[6][7]
  • Width (minimum width) of a convex polygon[8]
  • Maximum distance between two convex polygons[9][10]
  • Minimum distance between two convex polygons[11]
  • WIdest empty (or separating) strip between two convex polygons (a simplified low-dimensional variant of a problem arising in support vector machine based machine learning)
  • Grenander distance between two convex polygons[12]
  • Optimal strip separation (used in medical imaging and solid modeling)[13]

Bounding boxes

Triangulations

Multi-Polygon operations

  • Union of two convex polygons
  • Common tangents to two convex polygons
  • Intersection of two convex polygons[15]
  • Critical support lines of two convex polygons
  • Vector sums (or Minkowski sum) of two convex polygons[16]
  • Convex hull of two convex polygons

Traversals

  • Shortest transversals[17][18]
  • Thinnest-strip transversals[19]

Others

  • Non parametric decision rules for machine learned classification[20]
  • Aperture angle optimizations for visibility problems in computer vision[21]
  • Finding longest cells in millions of biological cells[22]
  • Comparing precision of two people at firing range
  • Classify sections of brain from scan images

Minimum width of a convex polygon

 ARRAY points := {P1, P2, ..., PN};
 
 points.delete(middle vertices of any collinear sequence of three points);
  
 REAL p_a := index of vertex with minimum y-coordinate;
 REAL p_b := index of vertex with maximum y-coordinate;
 
 REAL rotated_angle := 0;
 REAL min_width := INFINITY;
 
 VECTOR caliper_a(1,0);    // Caliper A points along the positive x-axis
 VECTOR caliper_b(-1,0);   // Caliper B points along the negative x-axis
 
 WHILE rotated_angle < PI
   
   // Determine the angle between each caliper and the next adjacent edge in the polygon
   VECTOR edge_a(points[p_a + 1].x - points[p_a].x, points[p_a + 1].y - points[p_a].y);
   VECTOR edge_b(points[p_b + 1].x - points[p_b].x, points[p_b + 1].y - points[p_b].y);
   REAL angle_a := angle(edge_a, caliper_a);
   REAL angle_b := angle(edge_b, caliper_b);
   REAL width := 0;
   
   // Rotate the calipers by the smaller of these angles
   caliper_a.rotate(min(angle_a, angle_b));
   caliper_b.rotate(min(angle_a, angle_b));
   
   IF angle_a < angle_b
     p_a++;  // This index should wrap around to the beginning of the array once it hits the end
     width = caliper_a.distance(points[p_b]);
   ELSE
     p_b++;  // This index should wrap around to the beginning of the array once it hits the end
     width = caliper_b.distance(points[p_a]);
   END IF
   
   rotated_angle = rotated_angle + min(angle_a, angle_b);
   
   IF (width < min_width)
     min_width = width;
   
   END IF
 END WHILE
 
 RETURN min_width;

References

  1. ^ "Rotating Calipers" at Toussaint's home page
  2. ^ Shamos, Michael (1978). "Computational Geometry" (PDF). Yale University. pp. 76–81.
  3. ^ Toussaint, Godfried T. (1983). "Solving geometric problems with the rotating calipers". Proc. MELECON '83, Athens. {{cite journal}}: Cite journal requires |journal= (help)
  4. ^ Toussaint, Godfried (2014). "The Rotating Calipers: An Efficient, Multipurpose, Computational Tool" (PDF). Proceedings of the International conference on Computing Technology and Information Management: 215–225.
  5. ^ Pirzadeh, Hormoz. "Computational geometry with the rotating calipers". McGill Library.
  6. ^ Binay K. Bhattacharya and Godfried T. Toussaint, "Fast algorithms for computing the diameter of a finite planar set," The Visual Computer, Vol. 3, No. 6, May 1988, pp.379–388.
  7. ^ Binay K. Bhattacharya and Godfried T. Toussaint, "A counter example to a diameter algorithm for convex polygons," IEEE Trans. Pattern Analysis and Machine Intelligence, Vol. PAMI-4, No. 3, May 1982, pp. 306–309.
  8. ^ Michael E. Houle and Godfried T. Toussaint, “Computing the width of a set,” IEEE Transactions Pattern Analysis & Machine Intelligence, Vol. 10, no. 5, September 1988, pp. 761–765.
  9. ^ Godfried T. Toussaint and Jim A. McAlear, "A simple O(n log n) algorithm for finding the maximum distance between two finite planar sets," Pattern Recognition Letters, Vol. 1, 1982, pp. 21–24.
  10. ^ Binay K. Bhattacharya and Godfried T. Toussaint, "Efficient algorithms for computing the maximum distance between two finite planar sets," Journal of Algorithms, vol. 14, 1983, pp. 121–136.
  11. ^ Godfried T. Toussaint and Binay K. Bhattacharya, "Optimal algorithms for computing the minimum distance between two finite planar sets," Pattern Recognition Letters, vol. 2, December, 1983, pp. 79–82.
  12. ^ MARTINEZ, HUGO M. (January 1, 1978). "Review of: "PATTERN SYNTHESIS", by U. Grenander, Springer-Verlag, New York, 1976. 509 pp". International Journal of General Systems. 4 (2): 126–127. doi:10.1080/03081077808960672. ISSN 0308-1079.
  13. ^ Barequet and Wolfers (1998). "Optimizing a Strip Separating Two Polygons". Graphical Models and Image Processing. doi:10.1006/gmip.1998.0470.
  14. ^ Teichmann, Marek (1989). "Wedge placement optimization problems".
  15. ^ Godfried T. Toussaint, "A simple linear algorithm for intersecting convex polygons, The Visual Computer, Vol. 1, 1985, pp. 118–123.
  16. ^ Tomas Lozano-Perez, "Spatial planning: A configuration space approach," IEEE Transactions on Computers, Vol. 32, No. 2, 1983, pp. 108–120.
  17. ^ Binay K. Bhattacharya and Godfried T. Toussaint, "Computing shortest transversals," Computing, vol. 46, 1991, pp. 93–119.
  18. ^ Binay K. Bhattacharya, Jurek Czyzowicz, Peter Egyed, Ivan Stojmenovic, Godfried T. Toussaint, and Jorje Urrutia, "Computing shortest transversals of sets," International Journal of Computational Geometry and Applications, Vol. 2, No. 4, December 1992, pp. 417–436.
  19. ^ Jean-Marc Robert and Godfried T. Toussaint, "Linear approximation of simple objects," Computational Geometry: Theory and Applications, Vol. 4, 1994, pp. 27–52.
  20. ^ Rasson and Granville (1996). "Geometrical tools in classification". Computational Statistics & Data Analysis. 23 (1): 105–123. doi:10.1016/S0167-9473(96)00024-2.
  21. ^ "Some Aperture-Angle Optimization Problems". Algorithmica. 33 (4): 411–435. 2002-08-01. doi:10.1007/s00453-001-0112-9. ISSN 0178-4617.
  22. ^ "Incorrect Diameter Algorithms for Convex Polygons".

See also