Message Boards Message Boards

GROUPS:

[✓] Find the smallest circumsphere containing N points?

Posted 7 months ago
720 Views
|
2 Replies
|
2 Total Likes
|

How to draw the smallest Circumsphere containing N points?

2 Replies

Something like this?

M = 10; (*Number of points*)
data = RandomReal[1, {M, 2}]; (*Generate coords of points*)
Show[RegionPlot[BoundingRegion[data, "MinDisk"]], Graphics[{Red, Point /@ data}]] (*Calculate Circumdisk and plot*)

enter image description here

In 3D

data3d = RandomReal[1, {M, 3}];
Show[RegionPlot3D[BoundingRegion[data3d, "MinBall"], PlotStyle -> Directive[Yellow, Opacity[0.5]]], Graphics3D[{Red, Point /@ data3d}]]

enter image description here

Cheers,

Marco

Posted 7 months ago

Thank you so much! But my version is 10.2, so it seems that the "BoundingRegion" cannot work. Do you know how to do with 10.2?

cheers, YN

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract