def f(t,y)= sin(t*y) let title$="f(x,y) = sin(x * y)" let tmin=-6 let tmax= 6 let ymin= -4 let ymax= 4 let a=-6 let b= 6 let c= -4 let d= 4 sub axis set color "red" box lines tmin,tmax,ymin,ymax set color "yellow" print print title$ plot tmin,0 ; tmax,0 plot 0,ymin ; 0,ymax plot text, at tmin,0: str$(tmin) plot text, at tmax,0: str$(tmax) plot text, at 0,ymin: str$(ymin) plot text, at 0,ymax: str$(ymax) end sub sub plotit let stop=0 do until y>ymax or ytmax or t tol then ! handles infinite slope ? let px=u let py=u let qx=v-epsi let qy=v+epsi else let del=epsi/(2*sqr(1+mf*mf)) let px=u-del let py=v-del*mf let qx=u+del let qy=v+del*mf end if plot px,py ; qx,qy next v next u end sub set mode "egahires" ! set mode "graphics" open #1 : screen .05,.95,.05,.95 window #1 set window tmin,tmax,ymin,ymax let n=2 let m=3 do clear let du=(b-a)/n let dv=(d-c)/m call direc call axis get key key let n=2*n let m=2*m loop until n>100 let m=16 let p=24 let dy0=(d-c)/m let dt0=(b-a)/p let n=256 let dt=(b-a)/n clear let start= 0 let col=1 for t0=a to b step dt0 for y0=c to d step dy0 plot let t=t0 let y=y0 set color col let col=col+1 if col=16 then let col=1 call plotit ! reverse time plot let dt=-dt let t=t0 let y=y0 call plotit let dt=abs(dt) next y0 next t0 call axis end