R/jnd2xyz.R
jnd2xyz.Rd
Converts a coldist()
output into Cartesian coordinates that are
perceptually-corrected (i.e. Euclidean distances = JND distances)
jnd2xyz( coldistres, center = TRUE, rotate = TRUE, rotcenter = c("mean", "achro"), ref1 = "l", ref2 = "u", axis1 = c(1, 1, 0), axis2 = c(0, 0, 1) )
coldistres | (required) the output from a |
---|---|
center | logical indicating if the data should be centered on its centroid
(defaults to |
rotate | logical indicating if the data should be rotated (defaults to |
rotcenter | should the vectors for rotation be centered in the achromatic center ("achro") or the data centroid ("mean", the default)? |
ref1 | the cone to be used as a the first reference. May be |
ref2 | the cone to be used as a the second reference. May be |
axis1 | A vector of length 3 composed of 0's and 1's, with
1's representing the axes (x,y,z) to rotate around. Defaults to c(1,1,0), such
that the rotation aligns with the xy plane (only used if data has 2 or 3 dimensions).
Ignored if |
axis2 | A vector of length 3 composed of 0's and 1's, with
1's representing the axes (x,y,z) to rotate around. Defaults to c(0,0,1), such
that the rotation aligns with the z axis (only used if data has 3 dimensions).
Ignored if |
Pike, T.W. (2012). Preserving perceptual distances in chromaticity diagrams. Behavioral Ecology, 23, 723-728.
Maia, R., White, T. E., (2018) Comparing colors using visual models. Behavioral Ecology, ary017 doi: 10.1093/beheco/ary017
Rafael Maia rm72@zips.uakron.edu
#> Warning: Quantum catch are relative, distances may not be meaningful#>jnd2xyz(cd.flowers)#> x y z #> Goodenia_heterophylla 1.53718118 -5.46159458 7.0514924 #> Goodenia_geniculata -0.59310315 -2.65363603 -6.4010132 #> Goodenia_gracilis -5.35249990 11.57575094 -22.9160486 #> Xyris_operculata 3.16707188 -1.34474081 -3.8107457 #> Eucalyptus_sp -0.03134485 -3.32415657 3.2303526 #> Faradaya_splendida -1.29639206 0.46232996 -2.7868330 #> Gaultheria_hispida 2.50443028 -4.15752823 -1.9683611 #> Geitonoplesium_cymosum 8.60482980 -7.04418816 8.3554048 #> Euryomyrtus_ramosissima -2.05359168 -0.37250955 5.1435291 #> Genista_linifolia -0.58649346 -1.81156877 -2.3301504 #> Genista_monspessulana -0.14356310 -3.20065722 -2.8881030 #> Geranium_sp 7.78622533 6.78399481 11.3644393 #> Glycine_clandestina -0.12166618 -2.82133147 -4.9021716 #> Gompholobium_ecostatum_1 2.32014969 0.01343586 5.9004073 #> Gompholobium_ecostatum_2 -0.35597946 -2.19758735 -6.2491817 #> Gompholobium_grandiflorum -3.21092428 4.62986466 -6.6125576 #> Gompholobium_huegelii 0.74658571 -1.85959598 6.5006043 #> Gompholobium_virgatum 1.64743911 -1.26454780 6.2822410 #> Gonocarpus_humilis 0.12111582 -3.92547632 -3.4985432 #> Gonocarpus_teucrioides -0.10675135 -2.22322988 2.3336963 #> Hibbertia_obtusifolia -0.52778583 -1.45422302 -1.8375439 #> Zieria_arborescens -4.71335405 9.56162650 9.4440349 #> Goodenia_lanata -4.52523519 7.81353151 -13.6100744 #> Goodenia_ovata -3.57431799 10.83505159 10.3387120 #> Goodenia_rotundifolia 2.98213580 -6.44640439 6.1896101 #> Grevillea_buxifolia 2.59032352 -3.64441651 1.6394104 #> Grevillea_steiglitziana -4.71094829 5.35795883 -0.6206625 #> Grevillea_oleoides -0.10128482 -3.18245178 -4.3953309 #> Gymnostachys_anceps -4.88100844 10.57079928 -9.2576390 #> Hakea_actites 1.28591187 -6.46308298 8.7478471 #> Hardenbergia_violaceae -1.56087094 0.54787062 -3.1446578 #> Hibbertia_acicularis 0.05050284 -3.55267520 2.0046822 #> Hibbertia_bracteata 7.58267580 -2.46048123 1.5050828 #> Hibbertia_empetrifolia -4.03056849 8.40782674 9.5245585 #> Hibbertia_procumbens 0.11607407 -3.47828825 -0.6629848 #> Hibbertia_linearis -0.56496920 -2.21566927 -7.6635029