[cag] reimplemented DeCasteljau algorithm