Path: utzoo!utgpu!water!watmath!clyde!att-cb!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!think!ames!elroy!mahendo!jplgodo!wlbr!etn-rad!jru From: jru@etn-rad.UUCP (John Unekis) Newsgroups: comp.graphics Subject: Re: Algorithm wanted: Circle enclosing points Message-ID: <496@etn-rad.UUCP> Date: 2 Apr 88 22:11:15 GMT References: Reply-To: jru@etn-rad.UUCP (John Unekis) Organization: Eaton Inc. IMSD, Westlake Village, CA Lines: 23 In article mp1u+@andrew.cmu.edu (Michael Portuesi) writes: >I am looking for an efficient algorithm that, given a set of points, finds the >smallest circle enclosing them and its center. Pseudocode, actual code (C, ... Try finding the maximum and minimum x coordinates, then average to get the center x. Do the same for y coordinates to get the center for y. Then look at the distances to those four points {sqrt((x1-x2)2 +(y1-y2)2)} from the center x,y and take the largest distance as the radius. To: wlbr!jplgodo!mahendo!elroy!ames!ncar!gatech!udel!rochester!PT.CS.CMU.EDU!andrew.cmu.edu!mp1u+ Subject: Re: Algorithm wanted: Circle enclosing points Newsgroups: comp.graphics In-Reply-To: Organization: Eaton Inc. IMSD, Westlake Village, CA Cc: Bcc: Try finding the maximum and minimum x coordinates, then average to get the center x. Do the same for y coordinates to get the center for y. Then look at the distances to those four points {sqrt((x1-x2)2 +(y1-y2)2)} from the center x,y and take the largest distance as the radius.