C# Welzl's Minimum Bounding Sphere

I’m not sure what you did exactly as I haven’t taken the time to really read and understand the changes to the code you made, but your changes do not work. I suspect it is an error in the MakeCircumcircle() function, but might be earlier, I didn’t study your changes closely.

Here is an example of your version using the YZ plane, you can clearly see it is not finding the minimum bounding circle. It should touch at least 2 points, likely 3, but only touches one, thus it is not the minimum.

I wrote this code a bit ago and I should update it to take planes I guess, but for right now what anyone who wants to can do is use the orient component to orient your points on a different plane to the XY plane, then orient the circle back. This will allow you to use my code for points with any plane. I will attach a gh file that shows this.

@AlexWer use this method for planes other than XY for now. I promise to revisit this code in the next couple months. I also plan to release a plugin which solves many tricky computational geometry problems such as mincircles, spheres, oriented bounding boxes, oriented bounding rectangles, largest empty circles/spheres, quickhull3D, minimum spanning trees, nearest neighbor graphs, etc etc.

WelzlforForum_planeByORIENT.gh (9.5 KB)

PS: Still looking for any help implementing Welzl’s Algorithm in 3D! Thanks everyone