algorithm - Placing a point to minimise distance from the farthest point -
i have question,
given set of points , how place point constraint distance farthest point small possible?.
this in reference this problem. not know how proceed. pointers anyone?
thanks
check out page. describes several methods this. http://www.personal.kent.edu/~rmuhamma/compgeometry/mycg/cg-applets/center/centercli.htm
in case link above ever dies, here's relevant part describes straight-forward method:
an o(n2)-time algorithm
- draw circle @ center, c, such points of given set lie within circle. clearly, circle can made smaller (or else have solution).
- make circle smaller finding point farthest center of circler, , drawing new circle same center , passing through point a. these 2 steps produce smaller enclosing circle. reason new circle smaller new circle still contains points of given set, except passes through farthest point, x, rather enclosing it.
- if circle passes through 2 or more points, proceed step 4. otherwise, make circle smaller moving center towards point a, until circle makes contact point b set.
at stage, circle, c, passes through 2 or more points of given set. if circle contains interval (point-free interval) of arc greater half circle's circumference on no points lie, circle can made smaller. let d , e points @ ends of point-free interval. while keeping d , e on circle's boundary, reduce diameter of circle until have either case (a) or case (b).
- case (a) diameter distance de.
- we done!
- case (b) circle c touches point set, f.
- check whether there exits point-free arc intervals of length more half circumference of c.
- if no such point-free arc intervals exit done!
- else
- goto step 4.
- in case, 3 points must lie on arc less half circumference in length. repeat step 4 on outer 2 of 3 points on arc.
- case (a) diameter distance de.
another page here, sample applet: http://www.sunshine2k.de/stuff/java/welzl/welzl.html
Comments
Post a Comment