/* wxMaxima Commands to plot a Bezier curve as a parametric plot. * * Usage: Copy and paste this file into the command window. * * M.V.Wickerhauser * 2019-10-10 */ /* Fix three control points. */ P0: [1,1]; P1: [1,3]; P2: [3,2]; P3: [2,1]; /* ...so use Bernstein polynomials of degree 3. */ B30:binomial(3,0)*(1-t)^3; B31:binomial(3,1)*(1-t)^2*t; B32:binomial(3,2)*(1-t)*t^2; B33:binomial(3,3)*t^3; /* Bezier curve B is a vector valued function of the parameter t. */ B: P0*B30+P1*B31+P2*B32+P3*B33; /* X(t) = B[1], Y(t) = B[2] */ /* Plot the Bezier curve with "parametric" plot2d() and 0