Geometry in Prolog

The Prolog language is a useful tool for geometric and graphics implementations because its primitives, such as unification, match the requirements of many geometric algorithms. We have implemented several problems in Prolog including a subset of the Graphics Kernel Standard, convex hull finding, planar graph traversal, recognizing groupings of objects, and boolean combinations of polygons using multiple precision rational numbers. Certain paradigms, or standard forms, of geometric programming in Prolog are becoming evident. They include applying a function to every element of a set, executing a procedure so long as a certain geometric pattern exists, and using unification to propagate a transitive function. Certain strengths and weaknesses of Prolog for these applications are now apparent.