Is the parameter “Exponent” of Minkowski Distance the p value of Minkowski Distance formula? Thank you!
1 Answer
Yes, the distance formula is the one you show: If you look it up in the Blender Reference Manual for older versions, the formula is given there, in the manual for the current version there are Wikipedia links to the formulas.
Read the Blender Reference Manual entry for the Voronoi Texture here:
If you follow the link to the Wikipedia article there, you will find this formula for the Minkowski distance:
$$D\left(X,Y\right) = \left(\sum_{i=1}^n |x_i-y_i|^p\right)^{\frac{1}{p}}$$
But of course the exponent ${\frac{1}{p}}$ can be written as
$$D\left(X,Y\right) = \sqrt[p]{\sum_{i=1}^n |x_i-y_i|^p}$$
and that is the formula you have in your question.
Now the Exponent which the node is referring to is not the "outer" exponent ${\frac{1}{p}}$, but the "inner" exponent $p$ as you already suspected.
In the old version's manual entry the formula is given directly with the notation using $\frac{1}{p}$, but the description clearly says:
Minkowski
A generalized algorithm that can represent all other distance metrics by configuring the Exponent input. This exponent represents $p$ in the Minkowski distance function.
"A generalized algorithm that can represent all other distance metrics" means, if you for example set $p=1$ you get the Manhattan distance, $p=2$ of course gives the Euclidean distance and $p\to\infty$ (if you could enter $\infty$ as value) would be Chebyshev.
-
1$\begingroup$ Thank you! I'm also inclined to believe that $p$ (instead of ${\frac{1}{p}}$) represents the Exponent input. Just to add, in the tutorial linked below, the tutor explained that when $p=2$ (not $\frac{1}{p}=2$), Minkowski Distance becomes Euclidean Distance. youtu.be/eutzTEGgLpE?t=629 $\endgroup$ Commented Mar 8, 2023 at 9:26
-
1$\begingroup$ @IanAmbrose Yes, I made a few tests with the Voronoi Texture and found it must be $p$, I already edited the answer to make it clear. $\endgroup$ Commented Mar 8, 2023 at 9:30
p
) $\endgroup$