Abstract
A procedure is developed that decides for given rectangle and triangle whether the triangle is contained in the rectangle, the rectangle is contained in the triangle, the two figures overlap or whether they are disjoint. The procedure uses interval barycentric coordinates, which allow a very transparent description of the test, as well as concise proof of correctness and completeness. The numerical execution needs only a few interval and non-interval arithmetic operations. Representative numerical examples are given for some of the cases. Contrasting this interval approach, a direct approach is considered that requires fewer arithmetic and logical operations. The direct approach has the disadvantage of being logically involved, resulting in a large number of cases that must be distinguished, while being computationally less expensive.
Similar content being viewed by others
References
Farin G (1993) Curves and surfaces for CAGD, 3rd edn. Academic Press, Boston
Ratschek H, Rokne J (1984) Computer methods for the range of functions. Ellis Horwood, Chichester
Ratschek H, Rokne J (1993) Test for intersection between plane and box. Comput Aided Des 25:249–250
Rokne J (1992) Interval arithmetic. Graphics gems III. Academic Press, New York, pp 61–66, 454–457
Skelboe S (1974) Computation of rational interval functions. BIT 14:87–95
Snyder JM, Barr AH (1987) Ray tracing complex models containing surface tesselations. Comput Graph 21:19–126
Author information
Authors and Affiliations
Additional information
Thanks are due to the National Science and Engineering Research Council of Canada for financial support.
Rights and permissions
About this article
Cite this article
Ratschek, H., Rokne, J. The relationship between a rectangle and a triangle. The Visual Computer 12, 360–370 (1996). https://doi.org/10.1007/BF01782234
Issue Date:
DOI: https://doi.org/10.1007/BF01782234