grasshopper2 Rhinorhino3d.com
ComponentVector
Distance With Metric
00000000-4217-470f-9114-6d29ced4257b
object preview

Compute the distance between two coordinates using a specific metric. Note that unlike regular Distance, this component operates on N-Dimensional points.

The available metrics are:

Value Name Info
0 Euclidean Linear distance measured along the geodesic.
1 Quadrance Square of the Euclidean distance.
2 Manhattan Sum of absolute differences per dimension, also called the 'L1−norm'.
3 Canberra Weighted version of Manhattan distance.
4 Angular Angular separation as measured from the world origin.
5 Radial Difference in Euclidean distances to the world origin.
6 Pearson One minus the Pearson correlation coefficient.
7 Jaccard One minus the Jaccard index.
8 Chebyshev The Infinity−norm.
9 Hamming The number of differing coordinate values.
10 MAE Normalised Manhattan distance. I.e. Manhattan distance divided by the dimensionality.
11 MSE Normalised Quadrance. I.e. Quadrance divided by the dimensionality.
12 RMSE The root of the Mean−Squared−Error.
1
2
2
3
4
5
Example file DistanceMetric.ghz.Interactive in Grasshopper 2
This file shows how various distance metrics result in wildly differing distance measurements when applied to the same points.