# TITLE: 3D-Grapher version 1.4 # AUTHOR: Roy F.A. Maclean # (based on 9700GE program by Lucio Marino Miranda Quintal, lucio@cinfo29.uma.pt) # EMAIL: rfamgm at gmail # WEB: http://www.spiderpixel.co.uk/caspro # DATE: 2Apr1996, 3Jun1999, 19Jan2000, 21Aug2006, 25Feb2007 # MAKE: CASIO # MODEL: 9850 # NOTES: This program enables you to graph functions of # two variables (X & Y). # Store the function in f1. # If the function shoots off to infinity at a gridpoint # then an Ma error will occur. If so try changing the endpoints # slightly e.g. if xmin is -pi, then try -pi+0.001 # You will be prompted for the scale: # xmin,xmax,ymin,ymax,xgrid,ygrid. # Where xgrid means the number of sub-intervals of the # interval xmin->xmax # # When you run the program it takes several seconds to do the # calculations before it draws the graph. # # Try: f1=e-(x^2+y^2) with xmin=-2,xmax=2,ymin=-2,ymax=2, # xgrid=10,ygrid=10 # # Or: f1=sqrt(100-x^2-y^2) with xmin=-6,xmax=6, # ymin=-6,ymax=6,xgrid=10,ygrid=10 # # Version 1.1 02Apr1996: A single Prog area version of Lucio Quintal's 9700GE program # Version 1.2 03Jun1999: Sets-up lists and matrices automatically # 19Jan2000: Change the matrix set-up # Version 1.3 21Aug2006: Version 1.2 didn't work at all, version 1.3 fixes that. # Version 1.4 25Feb2007: F-mem now uses only f1. Uses Lists and Drawstat to speed up calculation and drawing. # A graph which used to take 90s, now takes 15 seconds # # Compared to version 1.1 the parameters have been changed so that you now have to # add one to have same effect, e.g. xgrid=15 on v1.1 is equivalent to xgrid=16 on this version. # function memory: # f1: Your chosen function of X & Y # On 9850plus models and later # you can replace the lines # between the two ' apostophes # with the following line: # # {E,F}->Dim Mat A # # (above uses curly brackets) # # The first line of the program ("FUNCTION"?->f1) is only for 9860 and Algebra FX 2.0 models. # On other models this first line should be removed and f1 entered using the f-mem facility in Run mode. @@ Program "G3D" "FUNCTION"?->f1 FuncOff S-WindMan S-Gph1 DrawOn,xyLine,List 1,List 2,1,Dot,Blue S-Gph2 DrawOff S-Gph3 DrawOff 0->A~Z "XMIN"?->A:"XMAX"?->B "YMIN"?->C:"YMAX"?->D "XGRID"?->E "YGRID"?->F ' Seq(0,X,1,E,1)->List 1 Seq(0,X,1,F,1)->List 2 List->Mat(List 1) Mat Ans->Mat A For 1->G To F-1 Augment(Mat A,Mat Ans) Next Mat Ans->Mat A ' Mat A->Mat B Mat A->Mat C (B-A)/(E-1)->U (D-C)/(F-1)->V Seq(A+(G-1)U,G,1,E,1)->List 1 Seq(C+(G-1)V,G,1,F,1)->List 2 For 1->G To E List 1[G]->X For 1->H To F List 2[H]->Y f1->Mat A[G,H] Next Next 10^30->K~L:(-)K->I~J .375List 2->List 2 For 1->H To F List 2[H]->S Mat->List(Mat A,H)+S->List 4 List 1+S->List 3 Max(List 3) Ans>I=>Ans->I Min(List 3) AnsAns->K Max(List 4) Ans>J=>Ans->J Min(List 4) AnsAns->L If H=1 Then List->Mat(List 3)->Mat B List->Mat(List 4)->Mat C Else List->Mat(List 3):Augment(Mat B,Mat Ans)->Mat B List->Mat(List 4) Augment(Mat C,Mat Ans)->Mat C IfEnd Next 127/(I-K)->M:MK->K 63/(J-L)->N:NL->L ViewWindow 0,127,0,0,63,0 MMat B->Mat B NMat C->Mat C For 1->H To F Mat->List(Mat B,H)->List 1 Mat->List(Mat C,H)->List 2 List 1-K->List 1 List 2-L->List 2 DrawStat Next Trn Mat B->Mat B Trn Mat C->Mat C For 1->G To E Mat->List(Mat B,G)->List 1 Mat->List(Mat C,G)->List 2 List 1-K->List 1 List 2-L->List 2 DrawStat Next