Project 12: Convex Hull Finder
Scientific Computing
Builds on these lessons
Current Task
Objective
ConvexHull computes the smallest convex boundary enclosing a set of points — useful for outlining a cluster of data.
Task: compute the convex hull of a set of 2D points and print the vertex indices.
index.py
from scipy.spatial import ConvexHull
import numpy as np
points = np.array([[0, 0], [1, 0], [1, 1], [0, 1], [0.5, 0.5]])
hull = ConvexHull(points)
print(hull.vertices)
* Hint: Correct characters turn green, incorrect ones turn red.
Live Preview
🖼️
Verify your code to see the preview