This takes a matrix of LUV control-points and returns a palette-function
(that returns LUV values) based on a Bézier spline using those
control-points.
pal_luv_bezier(mat_luv, rescale_path = TRUE, n = 21)matrix of LUV coordinates, control-points for Bézier spline.
logical indicating to rescale the palette function to be
perceptually-uniform with respect to the input.
numeric if rescale_path, number of equally-spaced Bézier points to calculate.
A function with S3 class cpath_palette.
The default is to rescale the palette function so that it is perceptually uniform (in LUV space) using 21 points from the spline.
# create palette-function
pb <- pal_luv_bezier(mat_luv_blues)
# evaluate
pb(c(0, 0.5, 1))
#> l u v
#> [1,] 30.00000 -0.003424503 -0.009393376
#> [2,] 60.01002 -25.653215465 -70.481635374
#> [3,] 90.00000 -0.003433110 -0.009386274