Path: utzoo!mnetor!uunet!husc6!cmcl2!phri!roy From: roy@phri.UUCP (Roy Smith) Newsgroups: comp.graphics Subject: Re: Algorithm wanted: Circle enclosing points Message-ID: <3229@phri.UUCP> Date: 4 Apr 88 01:37:22 GMT References: <496@etn-rad.UUCP> Reply-To: roy@phri.UUCP (Roy Smith) Organization: Public Health Research Inst. (NY, NY) Lines: 13 jru@etn-rad.UUCP (John Unekis) writes: > Try finding the maximum and minimum x coordinates, then average to get the > center x. Do the same for y [...] look at the distances to those four > points [...] from the center x,y and take the largest distance as the radius. It doesn't take much thought to show that this doesn't work. Take, for example, the 5 points (0,-2), (2,0), (0,2), (-2,0), and (1.9,1.9). The min and max x and y are -2 and 2, giving a center of (0,0) and a radius of 2. The fifth point, (1.9,1.9) does not fall within that circle. -- Roy Smith, {allegra,cmcl2,philabs}!phri!roy System Administrator, Public Health Research Institute 455 First Avenue, New York, NY 10016