This chapter describes solutions to several problems concerning two-dimensional geometry. Geometry is a branch of mathematics concerned with the characteristics of points, lines, and other figures (shapes), the interaction between such figures, and the transformation of such figures. In this chapter, we'll focus on the characteristics of two-dimensional figures and the interactions between these objects.
There are several problems we must overcome when working with geometric objects in Python. The biggest hurdle is the problem of representation. Most geometric objects occupy a region in the two-dimensional plane, and as such, it is impossible to store every point that lies within the region. Instead, we have to find a more compact way to represent the region that can be stored as a relatively small number of points. For example, we might store a selection of points along the boundary of an object...