implementation of deboor's algorithm for drawing curves