The "dists" variable represents the distance between the points and the
circle measured along the radius of the circle.  Positive distances mean
that the point/vertex is inside the circle and negative distances mean that
the point is outside of the circle.  Without some type of penalty the
optimal circle would generally have some of the points inside and some
outside (this would be a regression like model fitting the best circle
instead of the best line).  Since we want all the points/vertices to be in
the circle we add the penalty for any points outside the circle.  This is
the penalty that worked for my examples, some other penalty may work better.

For a more analytic solution see my second post.  That idea could possibly
use some improvement as well, it is just what I thought of between waking
up and actually getting out of bed (then refined somewhat while waiting for
train into work to come).  It makes sense to me that it should work for
most cases, maybe even all cases, but I have not worked out a formal proof
of that.


On Sat, Jan 26, 2013 at 3:57 AM, Berry Boessenkool <
berryboessenkool@hotmail.com> wrote:

>
> Hi Greg,
>
> why did you add in particular
> + 10*sum(dists<0)
> in the function to be minimized?
>
> If I understand this correctly, this is the "punishment" of points outside
> the current circle.
> But if the points are very far apart (distances are large), then wouldn't
> optim focus more on that part of the sum, instead of the number of points
> outside as above?
> Shouldn't the factor 10 be relative to the distance units?
> Or is there a way to have optim only look at circles enclosing all vertices
> of the convex hull?
>
> I was thinking there must be an analytical solution, but apparently not:
> http://en.wikipedia.org/wiki/Smallest_circle_problem
>
> Berry
>
>
>
>
> --
> View this message in context:
> http://r-sig-geo.2731867.n2.nabble.com/Finding-the-Circumscribing-Circle-of-a-polygon-tp7582372p7582388.html
> Sent from the R-sig-geo mailing list archive at Nabble.com.
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>



-- 
Gregory (Greg) L. Snow Ph.D.
538280@gmail.com

	[[alternative HTML version deleted]]

