Previous Next


                                                                    170
           CHAPTER 3                                                                                  Syntax



           To explain the relationship between Domain, Encode, Size, Decode, and Range,
           we use the following notation:
           y = Interpolate ( x , x min , x max , y min , y max )

                         ⎛                 y max – y min ⎞
               = y min + ⎜ ( x – x min ) × ---------------------------- ⎟
                         ⎝                 x max – x min ⎠


           For a given value of x, Interpolate calculates the y value on the line defined by the
           two points (xmin , ymin ) and (xmax , ymax ).

                       TABLE 3.36 Additional entries specific to a type 0 function dictionary
KEY                  TYPE                 VALUE

Size                 array                (Required) An array of m positive integers specifying the number of samples
                                          in each input dimension of the sample table.

BitsPerSample        integer              (Required) The number of bits used to represent each sample. (If the function
                                          has multiple output values, each one occupies BitsPerSample bits.) Valid
                                          values are 1, 2, 4, 8, 12, 16, 24, and 32.

Order                integer              (Optional) The order of interpolation between samples. Valid values are 1 and
                                          3, specifying linear and cubic spline interpolation, respectively. (See imple-
                                          mentation note 40 in Appendix H.) Default value: 1.

Encode               array                (Optional) An array of 2 × m numbers specifying the linear mapping of input
                                          values into the domain of the function’s sample table. Default value:
                                          [ 0 (Size0 − 1) 0 (Size1 − 1) … ].

Decode               array                (Optional) An array of 2 × n numbers specifying the linear mapping of sam-
                                          ple values into the range appropriate for the function’s output values. Default
                                          value: same as the value of Range.

other stream         (various)            (Optional) Other attributes of the stream that provides the sample values, as
attributes                                appropriate (see Table 3.4 on page 62).

           When a sampled function is called, each input value xi , for 0 ≤ i < m, is clipped to
           the domain:
           x i ′ = min ( max ( x i , Domain 2i ) , Domain 2i + 1 )

Previous Next