Skip to content

Instantly share code, notes, and snippets.

@shouya
Created March 13, 2013 10:38
Show Gist options
  • Save shouya/5150960 to your computer and use it in GitHub Desktop.
Save shouya/5150960 to your computer and use it in GitHub Desktop.
formula to bezier curve through hand & maxima
x(l,x0) := if equal(l,1) then
x0[2] * t - x0[1] * t + x0[1]
else
expand(x(1,[x(l-1,makelist(x0[i],i,1,length(x0)-1)),
x(l-1,makelist(x0[i],i,2,length(x0)))]));
usage:
factor(x(2,[x[0],x[1],x[2]]));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment