Re: Smalest enclosing circle

*To*: mathgroup at smc.vnet.net*Subject*: [mg50083] Re: Smalest enclosing circle*From*: koopman at sfu.ca (Ray Koopman)*Date*: Sat, 14 Aug 2004 01:50:46 -0400 (EDT)*References*: <cfi8tm$4p6$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Steve Gray <stevebg at adelphia.net> wrote in message news:<cfi8tm$4p6$1 at smc.vnet.net>... > Given n points in the plane, I want to find the smallest > enclosing circle. Does anyone have Mathematica code to do this? In[1]:= xy = Table[Random[],{n=10},{2}] Out[1]= {{0.638751, 0.871865}, {0.0864434, 0.329484}, {0.187036, 0.881106}, {0.319298, 0.317072}, {0.438137, 0.531929}, {0.917911, 0.661329}, {0.734183, 0.883059}, {0.983413, 0.700878}, {0.196696, 0.611701}, {0.103151, 0.0506141}} In[2]:= Clear[z]; FindMinimum[Max[Norm[#-z]&/@xy], {z,Mean[xy],Median[xy]}] Out[2]= {0.560158, {z -> {0.472102, 0.472102}}}