POV-Ray : Newsgroups : povray.binaries.images : Tuesday Evening Enigma (mazepigm.jpg 83.3k bu) : metric (was: Re: Tuesday Evening Enigma (mazepigm.jpg 83.3k bu)) Server Time
3 Oct 2024 13:18:10 EDT (-0400)
  metric (was: Re: Tuesday Evening Enigma (mazepigm.jpg 83.3k bu))  
From: Thomas Willhalm
Date: 11 Feb 2000 02:54:52
Message: <qqmn1p85g37.fsf_-_@schlatt.fmi.uni-konstanz.de>
ron### [at] povrayorg (Ron Parker) writes:

> On Thu, 10 Feb 2000 15:47:25 -0600, David Fontaine wrote:
> >"SamuelT." wrote:
> >Oh! See, I was looking fot this "metric" thing and could not find it. What
> >does it do?
> 
> It changes the distance metric used to determine which centroid is
> closest.  metric 2 is the default, which corresponds to what's known
> as the 2-norm, |V|_2=sqrt(V.x^2+V.y^2+V.z^2).  This is also usually
> called the Pythagorean Theorem.  metric 1 is commonly called the 
> "taxicab distance" as it's the distance a taxicab would drive if it 
> had to follow city streets in a standard block pattern.
> It's |V|_1=V.x+V.y+V.z.  

You probably meant |V|_1 = |V.x| + |V.y| + |V.z|. In Germany they call this
the Manhattan metric, because standard block pattern aren't standard
here.

Another nice metric I know is the metric of the French railway:
You always have to travel via Paris. So, the distance between two points
A and B is the distance from a A to Paris plus the distance from Paris
to B. There is an exception though: If A, B and Paris lie on a straight
line, it's the distance between A and B.

Formally:

d(A,B) = |A-B|        if P in (A,B)
         |A-P|+|P-B|  otherwise
where | | denotes the Euclidean norm.

Perhaps we should start to distinguish between "metric" and "norm".
"metric" denotes something that can be interpreted as a distance
between to points. "norm" denotes something that can be interpreted
as the distance of a point to the origin in a vector space.

These notions are interconnected though. If you have a norm | |, you can
easily create a metric d by defining d(A,B) as d(A,B):=|A-B|. However,
this doesn't work the other way round. If you are given a norm, you
can't -- generally -- define a metric such that the equation above holds.
In particular, this isn't possible for the "metric of the French railway".
(For seeing this, we must define "norm" and "metric" more precisely.
If someone really wants to know, please ask.)

Thomas

-- 
http://thomas.willhalm.de/ (includes pgp key)


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.