[Tutor] Re: processing lines and polygons

Kent Johnson kent_johnson at skillsoft.com
Fri Oct 22 16:28:29 CEST 2004

After what you did to the dictionary, I don't know why you are so worried 
about hurting the feelings of a few points... :-)

But seriously, you are just trying to find points that look like they 
belong together. It's a somewhat vague notion to begin with, it doesn't 
have to be computed with any great accuracy.


At 04:11 PM 10/22/2004 +0200, Michael Dunn wrote:
> > You may not even need to take the sum of squares in get_distance().
> > max(abs(ax-bx), abs(ay-by)) would probably work fine for your purposes,
> > since you are just trying to find points that are visually close.
>I get it--this would find the closest point on the horizontal or the vertical
>axis rather than measuring the diagonal. Part of me doesn't like that as an
>approximation, since the data points we are dealing with are real places in
>real space, and it seems disrespectful. But thinking about it I'd be amazed if
>this ever caused a problem, since the pairs of points I want to join are all
>likely to be long way from other pairs that need joining. So I'm convinced.

More information about the Tutor mailing list