fablug Posted December 9, 2023 Share Posted December 9, 2023 (edited) For those who would like to plot some math function on their TI994A here a quite complete program I wrote using The Missing Link graphics features. I looked for something similar on the TI99 but didn't find any so I decided to write it by myself. It's quite fun if you want to help and study maths with your children using a "vintage machine" Line 100 contains the F(X) you should change with the one you want to plot XMIN and XMAX determine the width of the X Axis while YMIN and YMAX determine the height of Y Axis. If you want to try the function I put in as an example F(X)=SIN(X)*(X^2) try plot XMIN = -4 XMAX=4 YMIN = -4 YMAX = 4 Not exactly like Mathlab but.... quite similar 😁 Have fun!! 100 DEF F(X)=SIN(X)*(X^2) 110 REM 120 REM ************** 130 REM 140 REM BY FABRIZIO LUGLIO USING THE MISSING LINK XB 150 REM 160 ON WARNING NEXT 170 CALL LINK("GRAFIX") 180 PRINT " ANALYSIS OF FUNCION F(X)" 190 PRINT :"F(X) IS LOCATED AT LINE 100" 200 PRINT :"A CROSS BLINKS IN THE CORNER IF (X,Y) IS OUT OF SCREEN" :: PRINT 205 PRINT "PRESS <SPACE> WHILE DRAWING TO RESTART FROM HERE" 210 PRINT :: PRINT 220 PRINT "ENTER X&Y DOMAIN (MIN-MAX)" :: PRINT 230 INPUT "XMIN=":XMIN 240 INPUT "XMAX=":XMAX 250 IF(XMIN>XMAX)OR XMIN=XMAX THEN PRINT :"ERROR" :: PRINT :: GOTO 230 260 INPUT "YMIN=":YMIN 270 INPUT "YMAX=":YMAX 280 IF(YMIN>YMAX)OR YMIN=YMAX THEN PRINT :"ERROR" :: PRINT :: GOTO 260 290 CALL LINK("BITMAP") 300 CALL LINK("FONTA",1) 310 CALL LINK("CLEAR") 320 A$(0)="0042241818244200" 330 A$(1)="0808087F08080800" 340 CALL LINK("CHAR",1,A$(1)) 350 CALL LINK("SPRITE",1,1,14,1,235) 360 XDELTA=(XMAX-XMIN) 370 XSTEP=XDELTA/240 380 XVALUE=XMIN 390 YDELTA=(YMAX-YMIN) 400 XOLD=0 :: YOLD=0 410 GOSUB 610 :: REM ASSEX 420 GOSUB 710 :: REM ASSEY 430 FOR X=-120 TO 120 STEP 1 440 XVALUE=XVALUE+XSTEP 450 Y=F(XVALUE) 460 Y=(192/YDELTA)*Y 470 XC=X+120+2 480 YC=-Y+Y0 490 IF XC<0 OR XC>240 OR YC<0 OR YC>192 THEN CALL LINK("CHAR",1,A$(ABS(ROT))) :: ROT=NOT ROT :: GOTO 520 500 IF(XOLD=0)AND(YOLD=0)THEN XOLD=XC :: YOLD=YC 510 CALL LINK("LINE",YC,XC,YOLD,XOLD) 520 YOLD=YC 530 XOLD=XC 540 CALL KEY(0,K,S) :: IF K=32 THEN 100 550 NEXT X 560 CALL SOUND(200,440,10) 570 CALL LINK("DELSPR",1) 580 CALL KEY(0,K,S) 590 IF S=0 THEN 580 600 GOTO 100 610 REM *** ASSE X *** 620 Y0=192-(-YMIN/(YMAX-YMIN))*192 630 IF YMIN>0 OR YMAX<0 THEN CALL LINK("PRINT",110,1,STR$(XMIN)) :: CALL LINK("PRINT",110,240-6*LEN(STR$(XMAX)),STR$(XMAX)) :: RETURN 640 CALL LINK("LINE",Y0,0,Y0,240) 650 CALL LINK("LINE",Y0,240,Y0-3,237) 660 CALL LINK("LINE",Y0,240,Y0+3,237) 670 IF Y0+5>190 THEN CALL LINK("PRINT",185,6,STR$(XMIN)) :: CALL LINK("PRINT",185,240-6*LEN(STR$(XMAX)),STR$(XMAX)) :: RETURN 680 CALL LINK("PRINT",Y0+5,1,STR$(XMIN)) 690 CALL LINK("PRINT",Y0+5,240-6*LEN(STR$(XMAX)),STR$(XMAX)) 700 RETURN 710 REM *** ASSE Y *** 720 XC=(-XMIN/(XMAX-XMIN))*240 :: XC=XC+1 730 IF XMIN>0 OR XMAX<0 THEN CALL LINK("PRINT",1,110,STR$(YMAX)) :: CALL LINK("PRINT",185,110,STR$(YMIN)) :: RETURN 740 CALL LINK("LINE",0,XC,192,XC) 750 CALL LINK("LINE",0,XC,3,XC-3) 760 CALL LINK("LINE",0,XC,3,XC+3) 770 CALL LINK("PRINT",1,XC+5,STR$(YMAX)) 780 CALL LINK("PRINT",185,XC+5,STR$(YMIN)) 790 RETURN TML-FUNC.BAS Edited December 9, 2023 by fablug more info 11 Quote Link to comment Share on other sites More sharing options...
WhataKowinkydink Posted December 9, 2023 Share Posted December 9, 2023 I haven't tried it out yet.... but cool! 😎👍 3 Quote Link to comment Share on other sites More sharing options...
fablug Posted December 9, 2023 Author Share Posted December 9, 2023 Thanks !!! 😀 4 minutes ago, WhataKowinkydink said: I haven't tried it out yet.... but cool! 😎👍 Here you can find the disk image too math.dsk 4 1 Quote Link to comment Share on other sites More sharing options...
WhataKowinkydink Posted December 10, 2023 Share Posted December 10, 2023 3 hours ago, fablug said: Thanks !!! 😀 Thank you - grabbed the disk image too :D 2 1 Quote Link to comment Share on other sites More sharing options...
fablug Posted December 10, 2023 Author Share Posted December 10, 2023 (edited) Here are some screenshots Edited December 11, 2023 by fablug images not working 2 Quote Link to comment Share on other sites More sharing options...
SteveB Posted December 10, 2023 Share Posted December 10, 2023 11 hours ago, fablug said: f(X).bmpUnavailable minmax.bmpUnavailable Doesn't work for me .. "Sorry! We could not locate the item you are trying to view." 1 1 Quote Link to comment Share on other sites More sharing options...
fablug Posted December 11, 2023 Author Share Posted December 11, 2023 (edited) 11 hours ago, SteveB said: Doesn't work for me .. "Sorry! We could not locate the item you are trying to view." Hi @SteveB, don't know why the images were not uploaded. Sorry I reposted them. Try now. Thank you Here they are Edited December 11, 2023 by fablug 2 Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted December 11, 2023 Share Posted December 11, 2023 Wonderful! I suggest however that you include the TML files on the disk image so you have a complete package. 4 Quote Link to comment Share on other sites More sharing options...
fablug Posted December 11, 2023 Author Share Posted December 11, 2023 3 hours ago, Vorticon said: Wonderful! I suggest however that you include the TML files on the disk image so you have a complete package. Thank you @Vorticon it's a nice idea!! I usually work on the TML using G.E.M. package in my FinalGrom99. Can you point me at a TML disk version with a complete loader? I may try to build a disk package 🙂. Thanks Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted December 11, 2023 Share Posted December 11, 2023 44 minutes ago, fablug said: Thank you @Vorticon it's a nice idea!! I usually work on the TML using G.E.M. package in my FinalGrom99. Can you point me at a TML disk version with a complete loader? I may try to build a disk package 🙂. Thanks I'll see if I can put a package together for you tonight. 2 1 Quote Link to comment Share on other sites More sharing options...
fablug Posted December 17, 2023 Author Share Posted December 17, 2023 (edited) Hi @Vorticon I made it!! 😀 Here it is! You'll find a complete disk package you can run from a standard TI EXTENDED BASIC environment. Just put the image into DSK1 and it will load automatically You'll find on the disk image: F(X)TML program written for a software TML library version loaded from Disk F(X)2023 is a version you can run from a TML version on cartridge (eg. JEWEL6) README file with some info and examples LOAD / INTRO / TML-LOAD files needed to set up the TML environment into a standard XB Now the program works all into graphics mode and there's an option to draw functions much faster (you can set PACE=5) Don't panic if you see some colored bricks on the screen for few seconds during loading. Enjoy! MATHLAB.DSK Edited December 17, 2023 by fablug 3 1 Quote Link to comment Share on other sites More sharing options...
apersson850 Posted December 18, 2023 Share Posted December 18, 2023 Nice. It's similar to what I can do with the bitmap library I developed for Pascal (p-system). I showed it to @jschultzpedersen when he visited me, running a convolution application in real-time, sampling data from an analogue input and displaying a graph on the fly. 4 Quote Link to comment Share on other sites More sharing options...
fablug Posted December 18, 2023 Author Share Posted December 18, 2023 Thank you! I would like to take a look 🙂 if possible! Quote Link to comment Share on other sites More sharing options...
apersson850 Posted December 18, 2023 Share Posted December 18, 2023 That exact application takes hardware I have in my real TI 99/4A only. But you are welcome to visit! 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.