A: By subdividing the plane into twelve (12) regions (green lines) and
then defining a distance (red balls & black lines) for each of the
points. Then determine e.g. the mean value of the distances found.
A picture says more than a thousand words:
http://hdebruijn.soo.dto.tudelft.nl/jaar2010/rechthoek.jpg
Any (maybe better) ideas? For other figures?
Han de Bruijn
Let P be the set of points in the point cloud, R the set of points on
the boundary of the rectangle, and d(x,y) the (Euclidean) distance
between the points x and y. If I understood your explanation and
picture correctly, the distance you've defined is equal to
D(P,R) := mean_{x in P} inf_{y in R} d(x,y).
This form should also work for arbitrary point sets R, and will also
generalize to arbitrary P as long as you can reasonably define the
mean of a real-valued function over P.
Note that the distance you've defined is not symmetric: in general,
D(P,R) =/= D(R,P) even if both are defined. This is because you're
taking the mean over P but the infimum over R.
--
Ilmari Karonen
To reply by e-mail, please replace ".invalid" with ".net" in address.
Right. But is there a(nother) sensible means to MAKE it symmetric?
Han de Bruijn
Sure. For example, you could decide to take the infimum over both
sets, giving you essentially the distance between the closest points
of the two sets. This is symmetric (and defined for all non-empty
subsets of the underlying metric space), though it is not itself a
metric. (It fails both the triangle inequality and the identity of
indiscernibles.)
Alternatively, you could take the mean over both sets and get a
measure of the average distance between the points in the two sets. I
believe that this should in fact be a metric on the finite non-empty
subsets of the underlying space. (For infinite sets there's the
problem of defining the mean appropriately, and I don't believe
there's any definition that wouldn't allow two distinct sets to have a
zero distance.)
You could also generalize this definition of mean distance to apply to
weighted sets, or more formally to measures over the underlying space,
as in
D(m,n) = int_{E^2} d(x,y) n(dy) m(dx) / n(E) m(E)
where m and n are (finite) measures over the metric space E. This
also solves the definitional issue I alluded to before, or at least
replaces it with the issue of defining suitable measures for your
sets.
You could also consider other types of means besides the arithmetic
mean. For example, root mean square would seem intuitively appealing
for this purpose. This won't affect the symmetry in any way, though.
One more way to provide your distance function with symmetry would be
to simply impose it, defining e.g. D_sym(P,R) = max( D(P,R), D(R,P) )
for any distance function D. You could of course also use the minimum
or the average of the distances, or indeed any symmetric function from
R^2 to R. For example, the Hausdorff distance between sets in a
metric space is defined in this way.
How about the following?
D(P, Q) := max{ D'(P, Q), D'(Q, P) }, where
D'(P, Q) := sup_{x in P} inf_{y in Q} d(x,y).
Then D'(P, Q) = sup_{x in P} D'({x}, Q).
And D'({x}, Q) = inf_{y in Q} d(x,y), hence D'({x}, Q) = 0 iff x is in
the closure of Q (i.e. Q contains points arbitrarily close to x).
Hence, D(P,Q) = 0 iff every point of P is 'arbitrarily close' to some
point of Q and vice versa. With this definition, D(P, Q) is some kind of
upper limit for this 'closeness'.
Example: for n = 1,2,3,..., let S_n be the circle with center (0,0) and
radius 1+1/n. Then with the above metric, this sequence of shapes
'converges' to the circle with center (0,0) and radius 1.
--
Cheers,
Herman Jurjus