Two scales which lie on the same ray from edoo()
(the perfectly even
scale) differ only in their saturation and are said to belong to the same
"hue." They are not only members of a large "color" but also a much more
specific structure which preserves properties such as ratio()
and the
precise shape of brightnessgraph()
. same_hue()
tests whether two
scales have this close relationship.
Value
Boolean: are the sets of the same hue? NB: TRUE
for identical
sets (even perfectly even scales); FALSE
for scales which are
related by "involution."
Examples
set39 <- c(0, 5, 9, 10, 14, 16, 21)
set53 <- c(0, 7, 13, 16, 22, 26, 33)
set39 <- convert(set39, 39, 12)
set53 <- convert(set53, 53, 12)
same_hue(set39, set53)
#> [1] TRUE
# Since they have the same hue, we can resaturate one to become the other:
relative_evenness <- evenness(set53)/evenness(set39)
set53
#> [1] 0.000000 1.584906 2.943396 3.622642 4.981132 5.886792 7.471698
saturate(relative_evenness, set39)
#> [1] 0.000000 1.584906 2.943396 3.622642 4.981132 5.886792 7.471698
# These two hexachords belong to the same quasi-pairwise well formed
# color (see "Modal Color Theory," p. 37), but not to the same hue:
guidonian_1 <- c(0, 2, 4, 5, 7, 9)
guidonian_2 <- convert(guidonian_1, 13, 12)
isTRUE(all.equal(signvector(guidonian_1), signvector(guidonian_2)))
#> [1] TRUE
same_hue(guidonian_1, guidonian_2)
#> [1] FALSE