Consider a colorSpec object x
with type
equal to 'responsivity.material'
and 3 responsivity spectra.
The function plotOptimals3D()
makes a plot of the object-color solid for x
.
This solid is a zonohedron in 3D.
The 3D drawing package rgl is required.
Consider a colorSpec object x
with type
equal to 'responsivity.material'
and 2 responsivity spectra.
The function plotOptimals2D()
makes a plot of the object-color solid for x
.
This solid is a zonogon in 2D.
The 3D drawing package rgl is not required.
The set of all possible material reflectance functions (or transmittance functions)
is convex, closed, and bounded (in any reasonable function space),
and this implies that the set of all possible output responses
from x
is also convex, closed, and bounded.
The latter set is called the object-color solid,
or Rösch Farbkörper, for x
.
A color on the boundary of the object-color solid is called an optimal color.
For more discussion see sectionOptimalColors()
.
# S3 method for colorSpec
plotOptimals3D( x, size=50, type='w', both=TRUE )# S3 method for colorSpec
plotOptimals2D( x )
The functions return TRUE
or FALSE
.
a colorSpec object with type
equal to
'responsivity.material'
and 2 or 3 spectra, as appropriate.
an integer giving the number of wavelengths at which to resample x
.
To skip resampling, set size=NA
.
type='w'
for a wireframe plot of the parallelogram faces.
type='p'
for a point plot with points at the centers of the parallelograms.
the color solid is symmetric about its center, so only half of it must
be computed.
If both=TRUE
it plots one half in black and the other half in red.
If both=FALSE
it only plots one half in black.
If n
is the number of wavelengths,
the number of parallelogram faces of the zonohedron is n*(n-1)
.
The time to compute these faces increase with n
even faster,
so that is why the default size=50
is a fairly small number.
It was chosen to be a reasonable compromise between detail and performance.
In addition to the wireframe or points,
it draws the box with opposite vertices at the "poles" 0 and W
and the diagonal segment of neutral grays that connects 0 and W.
If n
is the number of wavelengths,
the number of edges in the zonogon is 2*n
.
Computing these edges is fast and visualization is easy,
so there are no plotting options at this time.
Centore, Paul. A Zonohedral Approach to Optimal Colours. Color Research & Application. Vol. 38. No. 2. pp. 110-119. April 2013.
Logvinenko, A. D.
An object-color space.
Journal of Vision.
9(11):5, 1-23, (2009).
https://jov.arvojournals.org/article.aspx?articleid=2203976
.
doi:10.1167/9.11.5.
West, G. and M. H. Brill. Conditions under which Schrödinger object colors are optimal. Journal of the Optical Society of America. 73. pp. 1223-1225. 1983.
type()
,
probeOptimalColors()
,
sectionOptimalColors()
,
vignette Plotting Chromaticity Loci of Optimal Colors
# \donttest{
human = product( D50.5nm, 'slot', xyz1931.5nm, wave=seq(400,770,by=5) )
plotOptimals3D( human )
plotOptimals2D( subset(human,2:3) ) # y and z only
scanner = product( D50.5nm, 'slot', BT.709.RGB, wave=seq(400,770,by=5) )
plotOptimals3D( scanner )
# }
Run the code above in your browser using DataLab