1
$\begingroup$

Is the parameter “Exponent” of Minkowski Distance the p value of Minkowski Distance formula? Thank you!

enter image description here

$\endgroup$
2
  • $\begingroup$ P/S: To moderators, sorry if this post doesn't fit this site. Please keep it up for at least a day, I've asked everywhere else and still haven't received an answer. There's a chance someone here has the answer to this. $\endgroup$
    – Orange Cat
    Commented Mar 8, 2023 at 8:23
  • 1
    $\begingroup$ Personally, I think there's no problem with this question. it's about understanding, which aids the use of the application. Hopefully someone can scurry into the code and have a look for you. (The exponent seems unlikely to be anything other thanp) $\endgroup$
    – Robin Betts
    Commented Mar 8, 2023 at 8:27

1 Answer 1

2
$\begingroup$

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:

Voronoi Texture Node

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.

$\endgroup$
2
  • 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$
    – Orange Cat
    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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .