|On this page|
Whereas the create_cdf function creates a CDF from sample values, this functions creates a CDF by randomly sampling a curve defined by a list of
values and corresponding
positions (similar to a Ramp parameter).
See the create_cdf function docs for example code using a CDF.
float  spline_cdf(string bases, float values, float positions, ...)
Takes an array of bases, an array of key values, a corresponding array of key positions, and an optionally an int, res (resolution), corresponding to the number of samples to build the CDF with. Function samples the spline according to the resolution, then creates and returns a CDF from said samples. Note that there is only support for single dimension splines.
An array of strings describing how to interpret the corresponding
values: each string can be
"monotonecubic". See the spline function docs for information on how these options control the interpretation of the values.
When building a CDF, some splines may require more samples to accurately represent the spline. The
res (resolution) controls how many samples the function takes when constructing the CDF (and consequently the size of the CDF). The default is 128.
A float array representing a CDF (like the array returned by create_cdf).