# TITLE: 3D-Grapher version 1.1 # AUTHOR: Lucio Marino Miranda Quintal, lucio@cinfo29.uma.pt # (this version modified by Roy F.A. Maclean ) # EMAIL: rfamgm at gmail # WEB: http://www.spiderpixel.co.uk/caspro # DATE: 2Apr1996 # MAKE: CASIO # MODEL: fx9700GE or greater # SIZE: 584 +matrices # NOTES: This program enables you to graph functions of # two variables (X & Y). # Store the function in f6. # If the function shoots off to infinity within your chosen range # then an Ma error will occur. # You will be prompted for the scale: # xmin,xmax,ymin,ymax,xgrid,ygrid. # where xgid means how many sub-intervals of the interval xmin->xmax # Usually enter 10 for xgrid & ygrid. # Before running the program you must set # up matrices A,B & C with dimension [1+xgrid,1+ygrid] # and matrix D with dimension [1,1+xgrid] # and matrix E with dimension [1,1+ygrid] # # When you run the program it takes several seconds to do the # calculations before it draws the graph. # # Try: f6=e-(x^2+y^2) with xmin=-2,xmax=2,ymin=-2,ymax=2, # xgrid=10,ygrid=10 # # Or: f6=sqrt(100-x^2-y^2) with xmin=-6,xmax=6, # ymin=-6,ymax=6,xgrid=10,ygrid=10 # # ->O is assignment into the letter O , not a zero # Mf1+O is a sum with the letter O, not a zero # \10^ is the small 10 above the log button # function memory: # f1: Mat B[G+Q,H+R] # f2: Mat C[G+Q,H+R] # f6: Your chosen function of X & Y @@ Program 1 Mcl "XMIN"?->A:"XMAX"?->B "YMIN"?->C:"YMAX"?->D "XGRID"?->E:"YGRID"?->F 1->G:Lbl 0 A+(G-1)(B-A)/E->Mat D[1,G] Isz G:G<=E+1=>Goto 0 1->G:Lbl 1 C+(G-1)(D-C)/F->Mat E[1,G] Isz G:G<=F+1=>Goto 1 1->G:Lbl 2:1->H:Lbl 3 Mat D[1,G]->X Mat E[1,H]->Y f6->Mat A[G,H] Isz H:H<=F+1=>Goto 3 Isz G:G<=E+1=>Goto 2 -10 \10^ 30->I~J:-I->K~L 1->G:Lbl 4:1->H:Lbl 5 .375Mat E[1,H]->S Mat D[1,G]+S->Mat B[G,H] Mat A[G,H]+S->Mat C[G,H] f1f1->K f2f2->L f1>I=>f1->I f2>J=>f2->J Isz H:H<=F+1=>Goto 5 Isz G:G<=E+1=>Goto 4 125/(I-K)->M 61/(J-L)->N 126-MI->O:62-NJ->P 1->G:Lbl 6:1->H:Lbl 7 Mf1+O->Mat B[G,H] Nf2+P->Mat C[G,H] Isz H:H<=F+1=>Goto 7 Isz G:G<=E+1=>Goto 6 Range 0,126,0,0,62,0 1->G:Lbl A:1->H:Lbl B G>E=>Goto C 0->Q~R:Plot f1,f2 Isz Q Plot f1,f2:Line Lbl C H>F=>Goto D 0->Q~R:Plot f1,f2 Isz R Plot f1,f2:Line Lbl D Isz H:H<=F+1=>Goto B Isz G:G<=E+1=>Goto A