Quote:

On my Mac...

On Apple II it would look like this:

AppleWin: free

Writing your own equation plotter program: priceless!

Not a competitor to Graphmatica though :-)

Regards,

Gerson.

_{
-----------
10 REM ** GRAFICOS BIDIMENSIONAIS **
20 REM ** GERSON WASHISKI BARBOSA **
30 REM **** CURITIBA, 28/12/86 ****
40 FOR I = 32768 TO 32845: READ P: POKE I,P: NEXT
50 TEXT : HOME : VTAB 8: PRINT "- PARA FUNCOES EM COORDENADAS CARTE-": PRINT " SIANAS, DIGITE Y=F(X) NA LINHA 260.": HTAB 1: VTAB 12: PRINT "- PARA FUNCOES EM COORDENADAS POLA-": PRINT " RES, DIGITE R=F(T) NA LINHA 350."
60 HTAB 7: VTAB 16: PRINT "EM SEGUIDA, DIGITE <RUN70>": HTAB 12: VTAB 17: PRINT "E TECLE <RETURN>.": GOTO 740
70 HOME : HGR : HCOLOR= 3: GOSUB 6000
80 HPLOT 0,0 TO 278,0 TO 278,159 TO 0,159 TO 0,0
90 HOME : VTAB 23: INPUT "MX, DX, MY, DY: ";MX,DX,MY,DY
100 IF DX > = 21 THEN NR = MX / 21: GOSUB 6500:DX = NR
120 GOSUB 3500
130 M = 765:N = MX: GOSUB 1000:N = DX: GOSUB 1000:N = MY: GOSUB 1000:N = DY: GOSUB 1000
140 IF F1 THEN 160
150 FY = 159 / MY
160 H = 0:V = 0: GOSUB 4000
170 VTAB 23: INPUT "CX, CY: ";H,V
180 IF V < 0 OR V > MY OR H < 0 OR H > MX THEN 170
190 GOSUB 4500: GOSUB 4000
200 N = H: GOSUB 1000:N = V: GOSUB 1000
210 IF LT$ = "P" OR LT$ = "p" THEN 310
220 HTAB 1: VTAB 23: PRINT SPC( 40);: VTAB 23: INPUT "X1, X2: ";X1,X2
230 IF X1 < - H OR X2 > MX - H THEN 220
250 FOR X = X1 TO X2 STEP 1 / FX
260 Y = SIN (X)
270 IF FY * (V - Y) < 0 OR FY * (V - Y) > 170 THEN 290
280 HPLOT FX * (H + X),FY * (V - Y)
290 NEXT
300 GOTO 400
310 K = ATN (1) / 45
320 HOME : VTAB 23: INPUT "A1, A2: ";A1,A2
330 A1 = K * A1:A2 = K * A2
340 FOR T = A1 TO A2 STEP .02
350 R = ABS ( TAN (T)) ^ (1 / ABS ( TAN (T)))
360 X = R * COS (T):Y = R * SIN (T)
370 IF FY * (V - Y) < 0 OR FY * (V - Y) > 159 OR FX * (H + X) > 278 THEN 390
380 HPLOT FX * (H + X),FY * (V - Y)
390 NEXT
400 POKE 32846,0
405 HOME : VTAB 22: PRINT "DH: ";DX; TAB( 18)"DV: ";DY
410 VTAB 23: PRINT "OUTRO GRAFICO? / QUADRICULAR? <S,N,Q> ";
420 GET OP$
430 IF OP$ = "N" OR OP$ = "n" THEN TEXT : GOTO 740
440 IF (OP$ = "S" OR OP$ = "s") AND PEEK (32846) = 255 THEN CALL 32785: GOTO 490
450 IF (OP$ = "S" OR OP$ = "s") AND PEEK (32846) = 0 THEN 490
460 IF (OP$ = "Q" OR OP$ = "q") AND PEEK (32846) = 0 THEN CALL 32768: GOSUB 5000: GOTO 480
470 IF (OP$ = "Q" OR OP$ = "q") AND PEEK (32846) = 255 THEN CALL 32785: FOR T = 1 TO 250: NEXT
480 GOTO 420
490 GOSUB 6000: HOME : VTAB 23
500 IF LT$ = "C" THEN POKE 32847,0: GOTO 520
510 POKE 32847,1
520 PRINT "OUTRA FUNCAO? <S,N> ";
530 GET L$
540 IF L$ = "N" OR L$ = "n" THEN F2 = 1: GOTO 605
550 IF L$ < > "S" AND L$ < > "s" THEN 530
560 M$ = ") <RUN600> <RETURN>"
570 HOME : VTAB 23
580 IF LT$ = "P" OR LT$ = "p" THEN PRINT "350 R=F(T";M$: GOTO 740
590 PRINT " 260 Y=F(X";M$: GOTO 740
600 HTAB 1: VTAB 23: PRINT SPC( 40)
605 IF PEEK (32847) = 0 THEN LT$ = "C": GOTO 620
610 LT$ = "P"
620 HOME : VTAB 23: PRINT "MESMO QUADRO? <S,N> ";
630 GET L$
640 IF L$ = "N" OR L$ = "n" THEN HGR : GOTO 80
650 IF L$ < > "S" AND L$ < > " s" THEN 630
660 HOME : VTAB 23: PRINT "MESMAS COORDENADAS? <S,N> ";
670 GET L$
680 IF L$ = "N" OR L$ = "n" THEN 90
690 IF L$ < > "S" AND L$ < > "s" THEN 670
700 IF F2 THEN 210
710 HOME :M = 762: GOSUB 2500:MX = N: GOSUB 2500:DX = N: GOSUB 2500:MY = N: GOSUB 2500:DY = N: GOSUB 2500:H = N: GOSUB 2500:V = N: GOSUB 3500
720 IF F1 THEN 210
730 FY = 159 / MY: GOTO 210
740 END
1000 NI = INT (N): GOSUB 1500
1010 NI = (N - INT (N)) * 1E7: GOSUB 1500
1020 RETURN
1500 M = M + 3
1510 FOR I = 0 TO 2
1520 NI = NI / 256 ^ (2 - I): POKE M + I,NI:NI = (NI - INT (NI)) * 256 ^ (2 - I)
1530 NEXT
1540 RETURN
2500 N = 0:M = M + 9: GOSUB 3000
2510 N = N / 1E7:M = M - 3: GOSUB 3000
2520 RETURN
3000 FOR I = 0 TO 2
3010 N = N + PEEK (M + I) * 256 ^ (2 - I)
3020 NEXT
3040 RETURN
3500 F1 = 0:FX = 278 / MX
3510 IF MY = 0 THEN F1 = 1:MY = 159 / FX:FY = FX
3520 IF MY / DY > 13 THEN NR = MY / 13: GOSUB 6500:DY = NR
3530 HOME : VTAB 22: PRINT "DH: ";DX; TAB( 18)"DV: ";DY
3540 RETURN
4000 HPLOT FX * H,0 TO FX * H,159: HPLOT 0,FY * V TO 278,FY * V: GOSUB 5500
4010 RETURN
4500 HCOLOR= 0
4510 FOR I = DY TO MY STEP DY
4520 IF INT (FY * I) = 0 OR INT (FY * I) = 159 THEN 4540
4530 HPLOT 1,FY * I TO 3,FY * I
4540 NEXT
4550 FOR I = TX TO MX STEP DX
4560 IF INT (FX * I) = 0 OR INT (FX * I) = 278 THEN 4580
4570 HPLOT FX * I,1 TO FX * I,2
4580 NEXT
4590 HCOLOR= 3
4600 RETURN
5000 FOR I = DY TO MY STEP DY
5010 IF INT (FY * I) = 0 OR INT (FY * I) = 159 THEN 5030
5020 HPLOT 0,FY * I TO 278,FY * I
5030 NEXT
5040 FOR I = DX TO MX STEP DX
5050 IF INT (FX * I) = 0 OR INT (FX * I) = 278 THEN 5070
5060 HPLOT FX * I,0 TO FX * I,159
5070 NEXT
5090 RETURN
5500 D = 2
5510 IF H = 0 THEN D = 0
5520 FOR I = 0 TO MY STEP DY
5530 HPLOT FX * H - D,FY * I TO FX * H + 2,FY * I
5540 NEXT
5550 D = 2
5560 IF V = 0 THEN D = 0
5570 FOR I = 0 TO MX STEP DX
5580 HPLOT FX * I,FY * V - D TO FX * I,FY * V + 2
5590 NEXT
5600 RETURN
6000 HOME : VTAB 23: PRINT "COORDS. CARTESIANAS OU POLARES? <C,P> ";
6010 GET LT$
6020 IF LT$ < > "C" AND LT$ < > "c" AND LT$ < > "P" AND LT$ < > "p" THEN 6010
6030 RETURN
6500 F3 = 0
6510 IF INT (NR) = 0 THEN F3 = 1:NR = NR * 1E7
6520 X = INT ( LOG (NR) / LOG (10))
6530 NR = NR / 10 ^ X
6540 IF NR - INT (NR) > = .5 THEN NR = NR + 1
6550 NR = INT (NR) * 10 ^ X
6560 IF F3 THEN NR = NR / 1E7
6570 RETURN
7000 DATA 169,32,133,2,169,64,133,4,169,96,141,74,128
7010 DATA 32,34,128,96,169,64,133,2,169,32,133,4,169
7020 DATA 64,141,74,128,32,34,128,96,56,169,255,237,78
7030 DATA 128,141,78,128,169,0,133,1,133,3,160,0,177
7040 DATA 1,145,3,200,192,0,208,247,24,165,2,105,1,133
7050 DATA 2,165,4,105,1,133,4,201,96,208,228,96
}