PUT CONTOUR.82p This is a program for the TI-82 to find level surfaces of a function in x and y using Euler's method and implicit differentiation. ----begin documentation---- Start with z = f(x,y). We want to find a level surface f(x,y) = c. The program assumes that the user has used imlpicit differentiation on f(x,y) = c to find dy/dt and dx/dt and has found a starting point for the curve. The level curve is then plotted in both directions for the specified number of steps. The program prompts the user for dy/dt, dx/dt, dt (the step size), the of steps to take in each direction from the starting point on a curve, and the coordinates of a starting point. After a curve is sketched, the pauses and the user is given the opportunity to sketch more curves on the same graph. The program prompts for a step size, and the number of steps in each direction. It pauses after drawing the curve. The user can keep adding contours to the diagram. When running the program, the user is reminded that on the TI-82, inputing a function through a program requires that the function start with a double quote mark. The program uses the variables A, B, H, N, S, T, U, V, X, Y, and Z and thus changes the values of those memory locations. The differentials are stored in Y0 and Y9. This program was written by Mike May, S.J. from the department of Mathematics and Computer Science at Saint Louis University. Send comments to: maymk@slu.edu The most current copy is kept on a web page devoted to courseware kept at http://euler.slu.edu ----end documentation---- ----begin ASCII---- ### Lines beginning with 3 # marks are comments and should be cut from ### the program before loading. \START82\ \COMMENT=Contours by Euler \NAME=CONTOURS \FILE=contour.82p 1\->\Z Repeat Z=0 ### Put dy/dt into y_0 and dx/dt into y_9. ### The syntax of the calculator requires a quote mark ### when inputting into a function. Disp "ENTER DY/DT" Disp "DON'T FORGET" Disp "QUOTES BEFORE" Disp "THE FUNCTION" Input \Y0\ Disp "ENTER DX/DT" Disp "DON'T FORGET" Disp "QUOTES BEFORE" Disp "THE FUNCTION" Input \Y9\ 1\->\A Repeat A=0 ### Enter the step size and the number of steps in each direction. Disp "ENTER DT" Input H Disp "NUM OF STEPS" Disp "PER CONTOUR" Input N ClrDraw:FnOff 1\->\B Repeat B=0 ### Enter a starting point. Disp "START POINT" Disp "X COORD" Input U Disp "Y COORD" Input V ### This line handles a wierd TI-82 feature. Line(0,0,0,0) U\->\X V\->\Y ### Plot the curve in the positve direction. For(I,1,N) ### S and T are dx and dy respectively. \Y0\*H\->\T H*\Y9\\->\S Line(X,Y,X+S,Y+T) Y+T\->\Y X+S\->\X End ### Reset X and Y and plot in a negative direction. U\->\X V\->\Y For(I,1,N) \Y0\*H\->\T H*\Y9\\->\S Line(X,Y,X-S,Y-T) Y-T\->\Y X-S\->\X End Pause ### A chance to add level curves to the diagram. Disp "MORE" Disp "CONTOURS?" Disp "1 FOR YES" Disp "0 FOR NO" Prompt B End ### A chance to change dt and the number of steps. Disp "CHANGE" Disp "SETTINGS?" Disp "1 FOR YES" Disp "0 FOR NO" Prompt A End ### A chance to change dy/dt and dx/dt. Disp "ANOTHER" Disp "FUNCTION?" Disp "1 FOR YES" Disp "0 FOR NO" Prompt Z End Stop \STOP82\ ----end ASCII---- ----begin UUE---- begin 664 contour.82p M*BI423@R*BH:"@!#;VYT;W5R2!%=6QE<@`````````````````````` M```````````T`@L`)0(%0T].5$]54E,E`B,",01:/])::C`_WBI%3E1%4BE$ M68-$5"H_WBI$3TZN5"E&3U)'150J/]XJ455/5$53*4)%1D]212H_WBI42$4I M1E5.0U1)3TXJ/]Q>&3_>*D5.5$52*418@T14*C_>*D1/3JY4*49/4D=%5"H_ MWBI154]415,I0D5&3U)%*C_>*E1(12E&54Y#5$E/3BH_W%X8/S$$03_206HP M/]XJ14Y415(I1%0J/]Q(/]XJ3E5-*4]&*5-415!3*C_>*E!%4BE#3TY43U52 M*C_<3C^%/I<_,01"/])":C`_WBI35$%25"E03TE.5"H_WBI8*4-/3U)$*C_< M53_>*EDI0T]/4D0J/]Q6/YPP*S`K,"LP$3]5!%@_5@19/]-)*S$K3A$_7AF" M2`14/TB"7A@$4S^<6"M9*UAP4RM9<%01/UEP5`19/UAP4P18/]0_5018/U8$ M63_322LQ*TX1/UX9@D@$5#](@EX8!%,_G%@K62M8<5,K67%4$3]9<50$63]8 M<5,$6#_4/]@_WBI-3U)%*C_>*D-/3E1/55)3KRH_WBHQ*49/4BE915,J/]XJ M,"E&3U(I3D\J/]U"/]0_WBI#2$%.1T4J/]XJ4T545$E.1U.O*C_>*C$I1D]2 M*5E%4RH_WBHP*49/4BE.3RH_W4$_U#_>*D%.3U1(15(J/]XJ1E5.0U1)3TZO D*C_>*C$I1D]2*5E%4RH_WBHP*49/4BE.3RH_W5H_U#\_V5*P end ----end UUE---- eof (end of file)