-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,20 @@ | ||
# [cvxball](/book) | ||
|
||
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/cvxgrp/cvxball) | ||
|
||
We compute the smallest enclosing sphere for a set of points. | ||
|
||
```bash | ||
# create a numpy array where each row corresponds to a point | ||
# Each row should have the same number of elements and they | ||
# can be higher than 2... :-) | ||
points = np.array([[2.0, 4.0], [0, 0], [2.5, 2.0]]) | ||
circle = min_circle_cvx(points, solver="CLARABEL") | ||
|
||
# display the points & the circle | ||
fig = create_figure() | ||
fig.add_trace(circle.scatter()) | ||
fig.add_trace(Cloud(points).scatter()) | ||
fig.show() | ||
|
||
``` |