function c = taylor_bez(c) 

% TALYOR_BEZ : Bezier curve from Taylor form
% c = taylor_bez(c) 
% change Taylor to Bezier coefficients c(k,:) 
% via the recursion 
% c^m_m+k = c^m_m+k-1 + (m+1/n-m) c^m+1_m+k

[np1,d] = size(c);
for k=1:np1-1
   q = repmat([1:np1-k]',1,d);
   c(k+1:end,:) = c(k:end-1,:) + ... 
      (q./(np1-q)) .* c(k+1:end,:);
end 

