Curve

Date: 198x
Type: Program
Platform(s): TS 2068

Appears on

Source Code

    1 REM COPY BORDER !@ GO SUB VAL <> COPY @! BORDER GO SUB VAL <>x
   10 LET a=50: DIM x(20): DIM y(20): DIM b(20): DIM c(100): DIM d(100): POKE 23730,30: POKE 23731,231: GO TO 40
   20 INPUT "1)cls 2)copy 3)continue  ";t: IF t=1 THEN CLS 
   30 IF t=2 THEN COPY 
   40 INK 0: INPUT "1)begin 2)alter 3)store 4)quit";f
   50 GO TO (f*100)
  100 INPUT "total number of corners:  ";g
  110 IF g>20 THEN INPUT "MUST be <=20...try again:";g: GO TO 110
  120 LET n=g-1: INPUT "first coordinates: x=";x;" y=";y: GO SUB 750
  130 FOR i=1 TO n+1
  140 LET x(i)=x: LET y(i)=y
  150 PLOT x,y: IF i=n+1 THEN GO TO 180
  160 INPUT "next coordinates: x=";x;" y=";y
  170 GO SUB 750
  180 NEXT i
  190 GO SUB 510: GO TO 20
  200 INPUT "1)list 2)fix 3)old 4)both 5)MM";h
  210 IF h=5 THEN GO TO 20
  220 GO TO (200+h*30)
  230 CLS : PRINT "corner:  (x)    (y)"
  240 FOR i=1 TO n+1: PRINT "   ";i;")";TAB 10;x(i);TAB 17;y(i)
  250 NEXT i: GO TO 200
  260 INPUT "alter corner __? (0 if done)";i
  270 IF i=0 THEN GO SUB 500: GO TO 200
  280 INPUT "new coordinates: x=";x(i);" y=";y(i): GO TO 260
  290 INK 7: PLOT 175,USR 26727: INK 0: GO TO 200
  300 INK 7: PLOT 175,USR 26715: INK 0: GO TO 200
  320 INK 7: PLOT 175,USR 26727: INK 0: GO SUB 650: GO TO 20
  400 STOP 
  500 CLS 
  510 LET c(1)=x(1): LET d(1)=y(1)
  530 FOR e=2 TO a-1
  540 LET j=((e-1))/(a-1): LET b(1)=(1-j)^n
  550 FOR i=1 TO n
  560 LET b(i+1)=(g-i)/i*j/(1-j)*b(i)
  570 NEXT i
  580 LET c(e)=0: LET d(e)=0
  590 FOR i=1 TO n+1
  600 LET c(e)=c(e)+b(i)*x(i)
  610 LET d(e)=d(e)+b(i)*y(i)
  620 NEXT i
  630 NEXT e
  640 LET c(a)=x(g): LET d(a)=y(g)
  650 INPUT "C)curve only F)frame & curve";z$
  660 IF z$="c" THEN GO TO 710
  670 FOR i=1 TO n
  680 PLOT x(i),y(i)
  690 DRAW x(i+1)-x(i),y(i+1)-y(i)
  700 NEXT i
  710 FOR e=2 TO a-1
  720 PLOT c(e),d(e)
  730 NEXT e
  740 RETURN 
  750 IF x<=255 AND x>=0 AND y<=175 AND y>=0 THEN RETURN 
  760 INPUT "HEY!...x<256,y<176! x=";x;" y=";y: GO TO 750

People

No people associated with this content.

Scroll to Top