Merge branch 'master' of ssh://git.code.sf.net/p/maxima/code
[maxima.git] / tests / testbench_drawdf_manual.wxm
blobfcdbd6caf8448d664d0fdb280f7cf5de12ac1774
1 /* [wxMaxima batch file version 1] [ DO NOT EDIT BY HAND! ]*/
2 /* [ Created with wxMaxima version 17.07.0 ] */
3 /* [wxMaxima: title   start ]
4 A manual testbench for drawdf
5    [wxMaxima: title   end   ] */
8 /* [wxMaxima: comment start ]
9 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.
10    [wxMaxima: comment end   ] */
13 /* [wxMaxima: input   start ] */
14 load(drawdf)$
15 wait():=if wxplot_size = 'wxplot_size then (printf(falxe,"Press <enter> to continue"),readline(stdin))$
16 /* [wxMaxima: input   end   ] */
19 /* [wxMaxima: input   start ] */
20 drawdf(exp(-x)+y)$
21 /* [wxMaxima: input   end   ] */
24 /* [wxMaxima: input   start ] */
25 drawdf(exp(-t)+y, [t,y])$
26 /* [wxMaxima: input   end   ] */
29 /* [wxMaxima: input   start ] */
30 drawdf([y,-9*sin(x)-y/5], [x,1,5], [y,-2,2])$
31 /* [wxMaxima: input   end   ] */
34 /* [wxMaxima: input   start ] */
35 drawdf(2*cos(t)-1+y, [t,y], [t,-5,10], [y,-4,9],
36              [trajectory_at,0,0])$
37 /* [wxMaxima: input   end   ] */
40 /* [wxMaxima: input   start ] */
41 drawdf(2*cos(t)-1+y, [t,-5,10], [y,-4,9],
42              solns_at([0,0.1],[0,-0.1]),
43              color=blue, soln_at(0,0))$
44 /* [wxMaxima: input   end   ] */
47 /* [wxMaxima: input   start ] */
48 drawdf(2*cos(t)-1+y, [t,-5,10], [y,-4,9],
49              field_degree=2, field_grid=[20,15],
50              solns_at([0,0.1],[0,-0.1]),
51              color=blue, soln_at(0,0))$
52 /* [wxMaxima: input   end   ] */
55 /* [wxMaxima: input   start ] */
56 drawdf(2*cos(t)-1+y, [t,-5,10], [y,-4,9],
57              soln_arrows=true,
58              solns_at([0,0.1],[0,-0.1],[0,0]))$
59 /* [wxMaxima: input   end   ] */
62 /* [wxMaxima: input   start ] */
63 drawdf([x*(1-x-y), y*(3/4-y-x/2)], [x,0,1.1], [y,0,1],
64              field_degree=2, duration=40,
65              soln_arrows=true, point_at(1/2,1/2),
66              solns_at([0.1,0.2], [0.2,0.1], [1,0.8], [0.8,1],
67                       [0.1,0.1], [0.6,0.05], [0.05,0.4],
68                       [1,0.01], [0.01,0.75]))$
69 /* [wxMaxima: input   end   ] */
72 /* [wxMaxima: input   start ] */
73 drawdf([x*(1-x-y), y*(3/4-y-x/2)], [x,0,1.1], [y,0,1],
74               field_degree='solns, duration=40,
75               soln_arrows=true, point_at(1/2,1/2),
76               solns_at([0.1,0.2], [0.2,0.1], [1,0.8],
77                        [0.8,1], [0.1,0.1], [0.6,0.05],
78                        [0.05,0.4], [1,0.01], [0.01,0.75]))$
79 /* [wxMaxima: input   end   ] */
82 /* [wxMaxima: input   start ] */
83 drawdf([y,-9*sin(x)-y/5], tstep=0.05,
84           soln_arrows=true, point_size=0.5,
85               points_at([0,0], [2*%pi,0], [-2*%pi,0]),
86               field_degree='solns,
87               saddles_at([%pi,0], [-%pi,0]))$
88 /* [wxMaxima: input   end   ] */
91 /* [wxMaxima: input   start ] */
92 drawdf([y,-9*sin(x)-y/5], tstep=0.05,
93               show_field=false, soln_arrows=true,
94               point_size=0.5,
95               points_at([0,0], [2*%pi,0], [-2*%pi,0]),
96               saddles_at([3*%pi,0], [-3*%pi,0],
97                          [%pi,0], [-%pi,0]))$
98 /* [wxMaxima: input   end   ] */
101 /* [wxMaxima: input   start ] */
102 drawdf(x^2+y^2, [x,-2,2], [y,-2,2], field_color=gray,
103               key="soln 1", color=black, soln_at(0,0),
104               key="soln 2", color=red, soln_at(0,1),
105               key="isocline", color=green, line_width=2,
106               nticks=100, parametric(cos(t),sin(t),t,0,2*%pi))$
107 /* [wxMaxima: input   end   ] */
110 /* [wxMaxima: input   start ] */
111 colors : ['red,'blue,'purple,'orange,'green]$
112 drawdf([x-x*y/2, (x*y - 3*y)/4],
113               [x,2.5,3.5], [y,1.5,2.5],
114               field_color = gray,
115               makelist([ key   = concat("soln",k),
116                          color = colors[k],
117                          soln_at(3, 2 + k/20) ],
118                        k,1,5))$
119 /* [wxMaxima: input   end   ] */
123 /* Old versions of Maxima abort on loading files that end in a comment. */
124 "Created with wxMaxima 18.02.0.unofficial"$