/* [wxMaxima batch file version 1] [ DO NOT EDIT BY HAND! ]*/
/* [ Created with wxMaxima version 17.07.0 ] */
/* [wxMaxima: title   start ]
A manual testbench for drawdf
   [wxMaxima: title   end   ] */


/* [wxMaxima: comment start ]
Maxima cannot check if the output of this testbench matches the expected results. But it at least can issue commands that test most of drawdf's features.
   [wxMaxima: comment end   ] */


/* [wxMaxima: input   start ] */
load(drawdf)$
wait():=if wxplot_size = 'wxplot_size then (printf(falxe,"Press <enter> to continue"),readline(stdin))$
/* [wxMaxima: input   end   ] */


/* [wxMaxima: input   start ] */
drawdf(exp(-x)+y)$
/* [wxMaxima: input   end   ] */


/* [wxMaxima: input   start ] */
drawdf(exp(-t)+y, [t,y])$
/* [wxMaxima: input   end   ] */


/* [wxMaxima: input   start ] */
drawdf([y,-9*sin(x)-y/5], [x,1,5], [y,-2,2])$
/* [wxMaxima: input   end   ] */


/* [wxMaxima: input   start ] */
drawdf(2*cos(t)-1+y, [t,y], [t,-5,10], [y,-4,9],
             [trajectory_at,0,0])$
/* [wxMaxima: input   end   ] */


/* [wxMaxima: input   start ] */
drawdf(2*cos(t)-1+y, [t,-5,10], [y,-4,9],
             solns_at([0,0.1],[0,-0.1]),
             color=blue, soln_at(0,0))$
/* [wxMaxima: input   end   ] */


/* [wxMaxima: input   start ] */
drawdf(2*cos(t)-1+y, [t,-5,10], [y,-4,9],
             field_degree=2, field_grid=[20,15],
             solns_at([0,0.1],[0,-0.1]),
             color=blue, soln_at(0,0))$
/* [wxMaxima: input   end   ] */


/* [wxMaxima: input   start ] */
drawdf(2*cos(t)-1+y, [t,-5,10], [y,-4,9],
             soln_arrows=true,
             solns_at([0,0.1],[0,-0.1],[0,0]))$
/* [wxMaxima: input   end   ] */


/* [wxMaxima: input   start ] */
drawdf([x*(1-x-y), y*(3/4-y-x/2)], [x,0,1.1], [y,0,1],
             field_degree=2, duration=40,
             soln_arrows=true, point_at(1/2,1/2),
             solns_at([0.1,0.2], [0.2,0.1], [1,0.8], [0.8,1],
                      [0.1,0.1], [0.6,0.05], [0.05,0.4],
                      [1,0.01], [0.01,0.75]))$
/* [wxMaxima: input   end   ] */


/* [wxMaxima: input   start ] */
drawdf([x*(1-x-y), y*(3/4-y-x/2)], [x,0,1.1], [y,0,1],
              field_degree='solns, duration=40,
              soln_arrows=true, point_at(1/2,1/2),
              solns_at([0.1,0.2], [0.2,0.1], [1,0.8],
                       [0.8,1], [0.1,0.1], [0.6,0.05],
                       [0.05,0.4], [1,0.01], [0.01,0.75]))$
/* [wxMaxima: input   end   ] */


/* [wxMaxima: input   start ] */
drawdf([y,-9*sin(x)-y/5], tstep=0.05,
          soln_arrows=true, point_size=0.5,
              points_at([0,0], [2*%pi,0], [-2*%pi,0]),
              field_degree='solns,
              saddles_at([%pi,0], [-%pi,0]))$
/* [wxMaxima: input   end   ] */


/* [wxMaxima: input   start ] */
drawdf([y,-9*sin(x)-y/5], tstep=0.05,
              show_field=false, soln_arrows=true,
              point_size=0.5,
              points_at([0,0], [2*%pi,0], [-2*%pi,0]),
              saddles_at([3*%pi,0], [-3*%pi,0],
                         [%pi,0], [-%pi,0]))$
/* [wxMaxima: input   end   ] */


/* [wxMaxima: input   start ] */
drawdf(x^2+y^2, [x,-2,2], [y,-2,2], field_color=gray,
              key="soln 1", color=black, soln_at(0,0),
              key="soln 2", color=red, soln_at(0,1),
              key="isocline", color=green, line_width=2,
              nticks=100, parametric(cos(t),sin(t),t,0,2*%pi))$
/* [wxMaxima: input   end   ] */


/* [wxMaxima: input   start ] */
colors : ['red,'blue,'purple,'orange,'green]$
drawdf([x-x*y/2, (x*y - 3*y)/4],
              [x,2.5,3.5], [y,1.5,2.5],
              field_color = gray,
              makelist([ key   = concat("soln",k),
                         color = colors[k],
                         soln_at(3, 2 + k/20) ],
                       k,1,5))$
/* [wxMaxima: input   end   ] */



/* Old versions of Maxima abort on loading files that end in a comment. */
"Created with wxMaxima 18.02.0.unofficial"$
