Perlin3D_deriv implementation