Message Boards Message Boards

0
|
4513 Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:

[?] Find the smallest circumsphere containing N points?

Posted 6 years ago

How to draw the smallest Circumsphere containing N points?

POSTED BY: Nan Yang
2 Replies
Posted 6 years 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

POSTED BY: Nan Yang

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 BY: Marco Thiel
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