1482 |
|
</pre> |
1483 |
|
|
1484 |
|
<p> |
1485 |
< |
The first two real arguments indicate the limits of the covered |
1485 |
> |
The first two real arguments indicate the extrema of the |
1486 |
|
spectral range in nanometers. |
1487 |
< |
Subsequent real values correspond to multipliers in each wavelength band, |
1488 |
< |
where the first band goes from nmA to nmA+(nmB-nmA)/N, and N is the |
1489 |
< |
number of bands (i.e., the number of real arguments minus 2). |
1490 |
< |
The nmA wavelength may be greater or less than the nmB wavelength, |
1491 |
< |
but they may not be equal, and their ordering must correspond to |
1492 |
< |
the ordering of the spectral values. |
1487 |
> |
Subsequent real values correspond to multipliers at each wavelength. |
1488 |
> |
The nmA wavelength may be greater or less than nmB, |
1489 |
> |
but they may not be equal, and their ordering matches |
1490 |
> |
the order of the spectral values. |
1491 |
|
A minimum of 3 values must be given, which would act |
1492 |
|
more or less the same as a constant RGB multiplier. |
1493 |
|
As with RGB values, spectral quantities normally range between 0 |
1540 |
|
|
1541 |
|
<pre> |
1542 |
|
mod specfunc id |
1543 |
< |
2+ sval funcfile transform |
1543 |
> |
2+ sfunc funcfile transform |
1544 |
|
0 |
1545 |
|
2+ nmA nmB A3 .. |
1546 |
|
</pre> |
1548 |
|
<p> |
1549 |
|
Like the spectrum primitive, the wavelength range is specified |
1550 |
|
in the first two real arguments, and additional real values are |
1551 |
< |
accessible to the sval function. |
1551 |
> |
set in the evaluation context. |
1552 |
|
This function is fed a wavelenth sample |
1553 |
|
between nmA and nmB as its only argument, |
1554 |
|
and it returns the corresponding spectral intensity. |
1555 |
+ |
|
1556 |
+ |
<dt> |
1557 |
+ |
<a NAME="Specdata"> |
1558 |
+ |
<b>Specdata</b> |
1559 |
+ |
</a> |
1560 |
+ |
|
1561 |
+ |
<dd> |
1562 |
+ |
Specdata is like brightdata and colordata, but with more |
1563 |
+ |
than 3 specular samples. |
1564 |
+ |
|
1565 |
+ |
<pre> |
1566 |
+ |
mod specdata id |
1567 |
+ |
3+n+ |
1568 |
+ |
func datafile |
1569 |
+ |
funcfile x1 x2 .. xn transform |
1570 |
+ |
0 |
1571 |
+ |
m A1 A2 .. Am |
1572 |
+ |
</pre> |
1573 |
+ |
|
1574 |
+ |
<p> |
1575 |
+ |
The data file must have one more dimension than the coordinate |
1576 |
+ |
variable count, as this final dimension corresponds to the covered |
1577 |
+ |
spectrum. |
1578 |
+ |
The starting and ending wavelengths are specified in "datafile" |
1579 |
+ |
as well as the number of spectral samples. |
1580 |
+ |
The function "func" will be called with two parameters, the |
1581 |
+ |
interpolated spectral value for the current coordinate and the |
1582 |
+ |
associated wavelength. |
1583 |
+ |
If the spectrum is broken into 12 components, then 12 calls |
1584 |
+ |
will be made to "func" for the relevant ray evaluation. |
1585 |
+ |
|
1586 |
+ |
<dt> |
1587 |
+ |
<a NAME="Specpict"> |
1588 |
+ |
<b>Specpict</b> |
1589 |
+ |
</a> |
1590 |
+ |
|
1591 |
+ |
<dd> |
1592 |
+ |
Specpict is a special case of specdata, where the pattern is |
1593 |
+ |
a hyperspectral image stored in the common-exponent file format. |
1594 |
+ |
The dimensions of the image data are determined by the picture |
1595 |
+ |
just as with the colorpict primitive. |
1596 |
+ |
|
1597 |
+ |
<pre> |
1598 |
+ |
mod specpict id |
1599 |
+ |
5+ |
1600 |
+ |
func specfile |
1601 |
+ |
funcfile u v transform |
1602 |
+ |
0 |
1603 |
+ |
m A1 A2 .. Am |
1604 |
+ |
</pre> |
1605 |
+ |
|
1606 |
+ |
<p> |
1607 |
+ |
The function "func" is called with the interpolated pixel value |
1608 |
+ |
and the wavelength sample in nanometers, the same as specdata, |
1609 |
+ |
with as many calls made as there are components in "specfile". |
1610 |
|
|
1611 |
|
</dl> |
1612 |
|
|