Wedgie: Difference between revisions

If something "takes some form", it should cover all the possible cases
 
(3 intermediate revisions by 2 users not shown)
Line 70: Line 70:
== Derivation from mapping matrices ==
== Derivation from mapping matrices ==
{{Todo|inline=1| expand }}
{{Todo|inline=1| expand }}
Below is a script that finds the wedgie from a mapping matrix in [https://www.python.org/ Python], using [https://scipy.org/ Scipy].
<syntaxhighlight lang="python">
import itertools
import numpy as np
from scipy import linalg
def wedgie (breeds):
    combinations = itertools.combinations (range (breeds.shape[1]), breeds.shape[0])
    wedgie = np.array ([linalg.det (breeds[:, entry]) for entry in combinations])
    if wedgie[0] < 0:
        wedgie *= -1
    # convert to integer type if possible
    wedgie_rd = np.rint (wedgie)
    if np.allclose (wedgie, wedgie_rd, rtol = 0, atol = 1e-6):
        wedgie = wedgie_rd.astype (int)
       
    return wedgie
</syntaxhighlight>


== Derivation from edo joins ==
== Derivation from edo joins ==
{{See also| Linear algebra formalism #Wedge product }}
{{See also|Wedge product }}
 
[[File:Wedgediagram .png|thumb|504x504px|Wedge product diagram]]
Two [[vals]] can be combined into a wedgie representing the rank-2 temperament they both support using the wedge product. For example, wedging {{val| 5 8 12 }} and {{val| 7 11 16 }} (the patent vals for 5edo and 7edo) yields {{multival| (5×11 - 8×7) (5×16 - 12×7) (8×16 - 12×11) }}, which simplifies to {{multival| (55 - 56) (80 - 84) (128 - 132) }} and thus to {{multival| -1 -4 -4 }}, which is the wedgie for 5 & 7, a.k.a. meantone. Note that if you take a wedgie and flip all the signs, it still results in the same wedgie, so {{multival| -1 -4 -4 }} is the same as {{multival| 1 4 4 }} from before.  
Two [[vals]] can be combined into a wedgie representing the rank-2 temperament they both support using the wedge product. For example, wedging {{val| 5 8 12 }} and {{val| 7 11 16 }} (the patent vals for 5edo and 7edo) yields {{multival| (5×11 - 8×7) (5×16 - 12×7) (8×16 - 12×11) }}, which simplifies to {{multival| (55 - 56) (80 - 84) (128 - 132) }} and thus to {{multival| -1 -4 -4 }}. Note that we generally assume the first entry of the wedgie should be positive, for which we flip all the signs of it to obtain {{multival| 1 4 4 }}, which is the wedgie for 5 & 7, a.k.a. meantone.  


More than two vals can be combined into a higher-rank wedgie by an analogous method.
More than two vals can be combined into a higher-rank wedgie by an analogous method.