Exact minimum bounding spheres and circles
Updated 3 Dec 2022
Bounding Spheres and Circles
The problem of finding minimum bounding spheres (aka minimum enclosing spheres) is frequently encountered in a number of applications, including computer graphics and patter recognition. While a number of relatively simple algorithms exist for finding such spheres, there are no robust implementations of these algorithms in Matlab that can be readily found on-line. Functions contained in this submission are meant to fill this void.
Exact minimum bounding spheres and circles can be computed using the functions titled
ExactMinBoundCircle.m, both implementing Wezlz’s algorithm . Approximate minimum bounding
spheres in any dimension can be computed using
ApproxMinBoundSphereND.m function, which implements Ritter’s
For convenience, I also included functions
VisualizeBoundCircle.m that allow you to
visualize input point clouds (or meshes) with their respective minimum bounding sphere/circle (see demo pic).
For demonstration on how to use the functions, add this repository to your Matlab path and enter
 Welzl, E. (1991), 'Smallest enclosing disks (balls and ellipsoids)', Lecture Notes in Computer Science, Vol. 555, pp. 359-370
 Ritter, J. (1990), 'An efficient bounding sphere', in Graphics Gems, A. Glassner, Ed. Academic Press, pp.301-303
MIT © 2019 Anton Semechko firstname.lastname@example.org
Anton Semechko (2023). Exact minimum bounding spheres and circles (https://github.com/AntonSemechko/Bounding-Spheres-And-Circles), GitHub. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Versions that use the GitHub default branch cannot be downloaded
Use README.md from GitHub
- migrated to GitHub
- Made changes to return parameters of minimum bounding circles instead of circumcircles for point sets representing vertices of obtuse triangles. Thanks to Yves Konkel for pointing out this bug.
- Removed minor bug pointed out by Wang Yong
added a function that computes exact minimum bounding circles