JavaScript implementation of de Casteljau algorithm.