Skip to content

Port of algorithm for finding smallest enclosing sphere of spheres

Notifications You must be signed in to change notification settings

JendaPlhak/minballPy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minballPy

Port of C++ algorithm to Python for finding smallest enclosing sphere of spheres. Library documentation avaliable here For further information about the problem I recommend reading thesis by Kaspar Fisher.

alt text

Usage:

import random
import minball
spheres = []
for _ in range(10):
    center = [random.random() * 10, random.random() * 10]
    radius = random.random() * 5
    spheres.append(minball.Sphere2D(center, radius))

min_sphere = minball.get_min_sphere2D(spheres)
print(min_sphere.radius, min_sphere.center)

Available dimensions

Dimensions 1D-4D are provided out of the box. If other dimensions are needed, simply head to include/minball_py.hpp, change the range and recompile.

Dependencies

CGAL (For Ubuntu should be sufficient to do sudo apt-get install libcgal-dev)

gcc or clang (gcc is default)

Setup && Build

make setup && make

About

Port of algorithm for finding smallest enclosing sphere of spheres

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published