Reader small image

You're reading from  Applying Math with Python - Second Edition

Product typeBook
Published inDec 2022
PublisherPackt
ISBN-139781804618370
Edition2nd Edition
Concepts
Right arrow
Author (1)
Sam Morley
Sam Morley
author image
Sam Morley

Sam Morley is an experienced lecturer in mathematics and a researcher in pure mathematics. He is currently a research software engineer at the University of Oxford working on the DataSig project. He was previously a lecturer in mathematics at the University of East Anglia and Nottingham Trent University. His research interests lie in functional analysis, especially Banach algebras. Sam has a firm commitment to providing high-quality, inclusive, and enjoyable teaching, with the aim of inspiring his students and spreading his enthusiasm for mathematics.
Read more about Sam Morley

Right arrow

Computing convex hulls

A geometric figure is said to be convex if every pair of points within the figure can be joined using a straight line that is also contained within the figure. Simple examples of convex bodies include points, straight lines, squares, circles (disks), regular polygons, and so on. The geometric figure shown in Figure 8.5 is not convex since the points on the opposite sides of the hole cannot be connected by a straight line that remains inside the figure.

Convex figures are simple from a certain perspective, which means they are useful in a variety of applications. One problem involves finding the smallest convex set that contains a collection of points. This smallest convex set is called the convex hull of the set of points.

In this recipe, we’ll learn how to find the convex hull of a set of points using the Shapely package.

Getting ready

For this recipe, we will need the NumPy package imported as np, the Matplotlib package imported as mpl, and...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Applying Math with Python - Second Edition
Published in: Dec 2022Publisher: PacktISBN-13: 9781804618370

Author (1)

author image
Sam Morley

Sam Morley is an experienced lecturer in mathematics and a researcher in pure mathematics. He is currently a research software engineer at the University of Oxford working on the DataSig project. He was previously a lecturer in mathematics at the University of East Anglia and Nottingham Trent University. His research interests lie in functional analysis, especially Banach algebras. Sam has a firm commitment to providing high-quality, inclusive, and enjoyable teaching, with the aim of inspiring his students and spreading his enthusiasm for mathematics.
Read more about Sam Morley