View source: R/colorSpec.metrics.R
responsivityMetrics | R Documentation |
This function computes a few technical metrics regarding some geometric objects related to a responder: the spherical chromaticity polygon, cone, convex cone, and color-solid.
Currently the function only works if the number of spectra in x
is 3 (e.g. RGB or XYZ).
In this case the rows of as.matrix(x)
(after weighting by step size)
are called the generators; they are vectors in R^3
and we require that they are all in some open linear halfspace (unless a generator is 0).
The 0-based rays through the generators intersect a plane inside the halfspace to form the vertices
of the chromaticity polygon P
.
The 0-based rays through points of the interior of P
form a cone,
and the convex hull of this cone is a convex cone.
The central projection of P
onto the unit sphere is the spherical chromaticity polygon P_S
.
If type
is 'responsivity.material'
, then x
has an
object-color solid or Rösch Farbkörper,
which is a zonohedron Z
.
See Centore and vignette
Convexity and Transitions
for details.
Some simplification of the generators is performed during pre-processing.
Generators that are 0 (in all channels) are removed,
and a group of generators that are all positive multiples of each other is replaced by their sum.
The 3-vectors are called the condensed generators.
These simplifications do not change any of the geometric objects defined above.
## S3 method for class 'colorSpec'
responsivityMetrics( x )
x |
a colorSpec object with |
responsivityMetrics()
returns a list with these items:
generators |
a pair of integers, the 1st is the number of original generators, and the 2nd is the number of condensed generators |
zeros |
vector of wavelengths at which the responsivity is 0 (in all 3 channels) |
multiples |
a list of vectors of wavelengths; the responsivities in each vector (group) are positive multiples of each other |
salient |
a logical where TRUE means that there is some open linear halfspace that contains all the non-zero generators. If all the responsivities are non-negative, which is the usual case, then |
normal |
If |
If salient=TRUE
, then the list also contains:
concavities |
a |
coneangle |
the solid angle of the cone generated by the generators. This is identical to the area of the spherical chromaticity polygon, with concavities preserved. |
cxconeangle |
the solid angle of the convex cone generated by the generators, with no concavities.
This is identical to the area of the convex hull of the spherical chromaticity polygon.
If all responsivities are non-negative, which is the usual case, then this solid angle is less than
the solid angle of an octant, which is |
If the type of x is 'responsivity.material'
then the list also contains:
area |
the surface area of the object-color solid of |
volume |
the volume of the object-color solid of |
In case of global error, the function returns NULL
.
To determine the value of salient
, the package quadprog might be required.
Centore, Paul. A zonohedral approach to optimal colours. Color Research & Application. Vol. 38. No. 2. pp. 110-119. April 2013.
type
,
vignette Convexity and Transitions
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.