Skip to main content
Log in

An efficient algorithm for finding the CSG representation of a simple polygon

  • Published:
Algorithmica Aims and scope Submit manuscript

Abstract

Modeling two-dimensional and three-dimensional objects is an important theme in computer graphics. Two main types of models are used in both cases: boundary representations, which represent the surface of an object explicitly but represent its interior only implicitly, and constructive solid geometry representations, which model a complex object, surface and interior together, as a boolean combination of simpler objects. Because neither representation is good for all applications, conversion between the two is often necessary.

We consider the problem of converting boundary representations of polyhedral objects into constructive solid geometry (CSG) representations. The CSG representations for a polyhedronP are based on the half-spaces supporting the faces ofP. For certain kinds of polyhedra this problem is equivalent to the corresponding problem for simple polygons in the plane. We give a new proof that the interior of each simple polygon can be represented by a monotone boolean formula based on the half-planes supporting the sides of the polygon and using each such half-plane only once. Our main contribution is an efficient and practicalO(n logn) algorithm for doing this boundary-to-CSG conversion for a simple polygon ofn sides. We also prove that such nice formulae do not always exist for general polyhedra in three dimensions.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. J. Boyse and J. Gilchrist. GMSolid: Interactive modeling for design and analysis of solids.IEEE Comput. Graphics and Applications, 2:86–97, 1982.

    Google Scholar 

  2. C. Brown. PADL-2: A technical summary.IEEE Comput. Graphics and Applications, 2:69–84, 1982.

    Google Scholar 

  3. M. H. Brown.Algorithm Animation. ACM Distinguished Dissertations. MIT Press, Cambridge, MA, 1988.

    Google Scholar 

  4. M. H. Brown. Zeus: A system for algorithm animation. InProceedings of the 1991 IEEE Workshop on Visual Languages, pages 4–9, October 1991.

  5. M. H. Brown and J. Hershberger. Color and sound in algorithm animation.IEEE Trans, Comput., 25(12):52–63, 1992.

    Google Scholar 

  6. B. M. Chazelle. Computational Geometry and Convexity. Technical Report CMU-CS-80-150, Department of Computer Science, Carnegie-Mellon University, Pittsburgh, PA, 1980.

    Google Scholar 

  7. H. Edelsbrunner.Algorithms in Combinatorial Geometry. EATCS Monographs on Theoretical Computer Science, volume 10. Springer-Verlag, Berlin, 1987.

    Google Scholar 

  8. W. Franklin. Polygon properties calculated from the vertex neighborhoods. InProceedings of the 3rd ACM Symposium on Computational Geometry, pages 110–118, 1987.

  9. R. L. Graham and F. F. Yao. Finding the convex hull of a simple polygon.J. Algorithms,4:324–331, 1983.

    Google Scholar 

  10. L. Guibas, J. Hershberger, D. Leven, M. Sharir, and R. Tarjan. Linear time algorithms for visibility and shortest path problems inside triangulated simple polygons.Algorithmica, 2:209–233, 1987.

    Article  Google Scholar 

  11. L. Guibas, L. Ramshaw, and J. Stolfi. A kinetic framework for computational geometry. InProceedings of the 24th IEEE Symposium on Foundations of Computer Science, pages 100–111, 1983.

  12. J. Hershberger and M. H. Brown. Boolean Formulae for Simple Polygons. Research Report Videotape 50b, DEC Systems Research Center, Palo Alto, CA, 1989.

    Google Scholar 

  13. K. Hoffmann, K. Mehlhorn, P. Rosenstiehl, and R. E. Tarjan. Sorting Jordan sequences in linear time. InProceedings of the ACM Symposium on Computational Geometry, pages 196–203, 1985.

  14. D. T. Lee. On finding the convex hull of a simple polygon.Internat. J. Comput. Inform. Sci., 12:87–98, 1983.

    Google Scholar 

  15. M. M. Mano.Digitial Logic and Computer Design. Prentice-Hall, Englewood Cliffs, NJ, 1979.

    Google Scholar 

  16. M. Mäntylä.An Introduction to Solid Modeling. Computer Science Press, Rockville, MD, 1987.

    Google Scholar 

  17. D. McCallum and D. Avis. A linear algorithm for finding the convex hull of a simple polygon.Inform. Process. Lett., 9:201–206, 1979.

    Google Scholar 

  18. A. Melkman. On-line construction of the convex hull of a simple polyline.Inform. Process. Lett., 25:11–12, 1987.

    Google Scholar 

  19. M. Mortenson.Geometric Modeling. Wiley, New York, 1985.

    Google Scholar 

  20. R. Newell. Solid modelling and parametric design in the Medusa system. InComputer Graphics '82, Proceedings of the Online Conference, pages 223–235, 1982.

  21. J. O'Rourke.Art Gallery Theorems and Algorithms. Oxford University Press, Oxford, 1987.

    Google Scholar 

  22. M. Paterson and F. Yao. Binary partitions with applications to hidden-surface removal and solid modelling. InProceedings of the 5th ACM Symposium on Computational Geometry, pages 23–32, 1989.

  23. T. Pavlidis. Analysis of set patterns.Pattern Recognition, 1:165–178, 1968.

    Google Scholar 

  24. D. Peterson. Halfspace Representation of Extrusions, Solids of Revolution, and Pyramids. SANDIA Report SAND84-0572, Sandia National Laboratories, Albuquerque, NM, 1984.

    Google Scholar 

  25. F. P. Preparata and M. I. Shamos.Computational Geometry. Springer-Verlag, New York, 1985.

    Google Scholar 

  26. A. Requicha. Representations for rigid solids: Theory, methods, and systems.ACM Comput. Surveys, 12:437–464, 1980.

    Google Scholar 

  27. A. A. Schäffer and C. J. Van Wyk. Convex hulls of piecewise-smooth Jordan curves.J. Algorithms, 8:66–94, 1987.

    Google Scholar 

  28. W. Tiller. Rational B-splines for curve and surface representation.IEEE Comput. Graphics and Applications, 3, 1983.

  29. S. B. Tor and A. E. Middleditch. Convex decomposition of simple polygons.ACM Trans. Graphics, 3(4):244–265, 1984.

    Google Scholar 

  30. H. Voelcker, A. Requicha, E. Hartquist, W. Fisher, J. Metzger, R. Tilove, N. Birrell, W. Hunt, G. Armstrong, T. Check, R. Moote, and J. McSweeney. The PADL-1.0/2 system for defining and displaying solid objects.ACM Comput. Graphics, 12(3):257–263, 1978.

    Google Scholar 

  31. J. R. Woodwark and A. F. Wallis, Graphical input to a Boolean solid modeller. InProceedings of CAD 82, pages 681–688, Brighton, U.K., 1982.

Download references

Author information

Authors and Affiliations

Authors

Additional information

Communicated by Bernard Chazelle.

The first author would like to acknowledge the support of the National Science Foundation under Grants CCR87-00917 and CCR90-02352. The fourth author was supported in part by a National Science Foundation Graduate Fellowship. This work was begun while the first author was visiting the DEC Systems Research Center.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Dobkin, D., Guibas, L., Hershberger, J. et al. An efficient algorithm for finding the CSG representation of a simple polygon. Algorithmica 10, 1–23 (1993). https://doi.org/10.1007/BF01908629

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF01908629

Key words

Navigation