With two control colors (order 1), Bézier and Lagrange interpolation are identical.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(inout) | :: | id | |||
| integer, | intent(inout) | :: | nfail |
subroutine test_032(id, nfail) use forcolormap_utils, only: bezier, lagrange integer, intent(inout) :: id, nfail character(len=*), parameter :: name = "bezier == lagrange for 2 colors (order=1)" logical :: ok integer :: colors(2,3) integer, allocatable :: bmap(:,:), lmap(:,:) colors(1,:) = [ 0, 128, 255 ] colors(2,:) = [ 255, 64, 0 ] bmap = bezier(colors, 32) lmap = lagrange(colors, 32) ok = all(bmap == lmap) call report_test(name, ok, id, nfail) end subroutine test_032