Advertisement
STANAANDREY

beziercoeff

Mar 13th, 2023
1,280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.23 KB | None | 0 0
  1. function coeff=beziercoeff(x,y)
  2. bx=3*(x(2)-x(1));
  3. by=3*(y(2)-y(1));
  4. cx=3*(x(3)-x(2))-bx;
  5. cy=3*(y(3)-y(2))-by;
  6. dx=x(4)-x(1)-bx-cx;
  7. dy=y(4)-y(1)-by-cy;
  8. coeff=zeros(2,4);
  9. coeff(1,:)=[x(1),bx,cx,dx];
  10. coeff(2,:)=[y(1),by,cy,dy];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement