You enter points graphically and then the program draws a smooth curve through them, a uniform cubic spline. v1.1 for TI-82. ----begin documentation---- SPLINE v1.1 is Freeware Commercial Distribution Restricted Copyright (C) 1994 by Mikael Bonnier, Lund, Sweden. 1. System and Memory Requirements This program is for the TI-82. It consists of one main program, that uses 1078 bytes. It requires an additional 635 bytes for data to execute (for 5 vertices). SPLINE alters these variables: Real: A,B,C,D,E,F,G,H,I,K,L,M,N,S,T,V,W,X,Y List: L1,L2,L3,L4 Y-Vars: Y1,Y2,Y3,Y4,Y5,Y6,Y0,X1t,Y1t,X2t,Y2t (deleted by SPLINE) 2. Installation If you have TI-GRAPH LINK UUDecode this file, and send the resulting SPLINE.82P program to the calculator. If you don't have the link you will have to enter the ASCII82P listing below. The reason why the UUE portion of this file in v1.0 didn't work was because of bugs in ASCII82P.EXE, this was cured by editing the program on a Macintosh. The ASCII82P listing was correct though. 4. User Instructions Start the program by entering: prgmSPLINE You will be prompted for the number of vertices (or nodes, or points). Begin with say eight (max 99). Move the cross-hairs using the arrow keys and press enter. The cross-hairs returns to the origin. Repeat this for the remaining vertices. Wait while the program calculates the slope at each vertice. Then watch how the program plots the spline (uniform cubic). The program then pauses, press enter to continue. Now you can enter the frequency, that is the number of subintervals the curve divided into, one less than the number of strokes. The frequency is 100 initially. You can also quit here by entering 0. You can view the data lists using [STAT] 1 (Edit...), X and Y coordinates in L1 and L2, and the X slope and Y slope in L3 and L4. You can write a simple program to view the slope at each vertice: :For(I,1,dim L1) :Line(L1(I),L2(I),L1(I)+.1L3(I),L2(I)+.1L4(I)) :End 5. References A. K. Dewdney. "The (New) Turing Omnibus". Computer Science Press and W. H. Freeman and Company, New York, 1993. William H. Press, Brian P. Flannery, Saul A. Teukolsky, and William T. Vetterling. "Numerical Recipes: The Art of Scientific Computing". Cambridge University Press, Cambridge, 1986. Bruce A. Artwick. "Microcomputer Displays, Graphics, and Animation". Prentice-Hall, Englewood Cliffs, N.J., 1985. Suggestions, bug and bad-English-in-doc reports are always welcome to: Mikael Bonnier Osten Undens gata 88 SE-227 62 LUND SWEDEN Or use my Internet addresses: mikael.bonnier@gmail.com http://www.df.lth.se.orbin.se/~mikaelb/ // Mikael Bonnier ///////////////////////////////////////////////////////////////////// SPLINE är Freeware Rättigheterna till kommersiell distribution reserveras. Copyright (C) 1994 av Mikael Bonnier, Lund, Sverige. 1. System- och minnesbehov Detta program är avsett för TI-82. Det består av ett (1) huvudprogram som använder 1078 bytes. Det kräver ytterligare 635 bytes för data för att kunna exekvera (för fem (5) noder). SPLINE ändrar dessa variabler: Real (Reell): A,B,C,D,E,F,G,H,I,K,L,M,N,S,T,V,W,X,Y List: L1,L2,L3,L4 Y-Vars: Y1,Y2,Y3,Y4,Y5,Y6,Y0,X1t,Y1t,X2t,Y2t (raderas av SPLINE) 2. Installation Om du har TI-GRAPH LINK ss UUDekoda denna fil, och skicka det resulterande SPLINE.82P programmet till miniräknaren. Om du inte har LINKen (eller inte har denna fil i elektronisk form) så får du skriva in ASCII82P listningen nedan. Anledningen till att UUE delen av denna fil i v1.0 inte fungerade var buggar i ASCII82P.EXE, detta botades genom att redigera programmet ps en Macintosh. ASCII82P listningen var dock korrekt. 4. Användarinstruktioner Starta programmet genom att skriva in: prgmSPLINE [ENTER] Du blir uppmanad att mata in antalet noder (eng. vertices). Börja t ex med åtta (max 99). Flytta hårkorset med piltangenterna och tryck på ENTER. Hårkorset återvänder till origo. Upprepa detta för de återstående noderna. Vänta medans programmet beräknar lutningen vid varje nod. Se sedan hur programmet ritar upp splinen (likformig(?) kubisk). ['Spline' betyder 'utfräst skåra'.] Sen pausar programmet, tryck ENTER för att fortsätta. Nu kan du mata in frekvensen, dvs antalet delar som hela kurvan är uppdelad i, dvs ett mindre än antalet nedslag. Frekvensen (eng. frequency) är från början 100. Du kan också avsluta här genom att mata in 0. Du kan överblicka datalistorna genom att använda [STAT] 1 (Edit...), X och Y koordinaterna finns i L1 respektive L2, och X och Y lutningarna finns i L3 respektive L4. Man kan skriva ett litet program för att se lutningen vid varje nod: :For(I,1,dim L1) :Line(L1(I),L2(I),L1(I)+.1L3(I),L2(I)+.1L4(I)) :End 5. Referenser A. K. Dewdney. "The (New) Turing Omnibus". Computer Science Press and W. H. Freeman and Company, New York, 1993. William H. Press, Brian P. Flannery, Saul A. Teukolsky, and William T. Vetterling. "Numerical Recipes: The Art of Scientific Computing". Cambridge University Press, Cambridge, 1986. Bruce A. Artwick. "Microcomputer Displays, Graphics, and Animation". Prentice-Hall, Englewood Cliffs, N.J., 1985. Förslag, bugg och dåligsvenskaidokumentationen fel är ständigt välkomna till: Mikael Bonnier Östen Undéns gata 88 227 62 LUND Eller använd mina Internet adresser: mikael.bonnier@gmail.com http://www.df.lth.se.orbin.se/~mikaelb/ // Mikael Bonnier ///////////////////////////////////////////////////////////////////// ----end documentation---- ----begin ASCII---- \START82\ \COMMENT=1994 Mikael Bonnier,mikael.bonnier@gmail.com \NAME=SPLINE \FILE=SPLINE.82P Repeat 3\<=\N and N\<=\99 Input "VERTICES=?",N End ClrList \L1\,\L2\,\L3\,\L4\ FnOff PlotsOff FullScreen ZDecimal 0\->\\L1\(1) 0\->\\L2\(1) Plot1(Scatter,\L1\,\L2\,\dot icon\) For(I,1,N) Input X\->\\L1\(I) Y\->\\L2\(I) End DispGraph "A+BT+CT\^2\+DT\^3\"\->\\X1t\ "E+FT+GT\^2\+HT\^3\"\->\\Y1t\ "2V\^2\-VW-W\^2\"\->\\X2t\ "V\^2\+VW-2W\^2\"\->\\Y2t\ "\L1\(I)-\L1\(I+1)"\->\\Y1\ "\L1\(I+1)-\L1\(I-1)"\->\\Y2\ "\L1\(I-1)-\L1\(I)"\->\\Y3\ "\L2\(I)-\L2\(I+1)"\->\\Y4\ "\L2\(I+1)-\L2\(I-1)"\->\\Y5\ "\L2\(I-1)-\L2\(I)"\->\\Y6\ "\(-)\.5N(K(I-2)\^2\+L(I-1)\^2\+MI\^2\\#\ -2NX(K(I-2)+L(I-1)+MI))"\->\\Y0\ FnOff N-1\->\N 2\->\I \Y1\\->\K \Y2\\->\L \Y3\\->\M \Y0\(0)\->\\L3\(1) For(I,2,N) \Y1\\->\K \Y2\\->\L \Y3\\->\M \Y0\((I-1)/N)\->\\L3\(I) End N\->\I \Y0\(1)\->\\L3\(N+1) 2\->\I \Y4\\->\K \Y5\\->\L \Y6\\->\M \Y0\(0)\->\\L4\(1) For(I,2,N) \Y4\\->\K \Y5\\->\L \Y6\\->\M \Y0\((I-1)/N)\->\\L4\(I) End N\->\I \Y0\(1)\->\\L4\(N+1) ""\->\\Y0\ ""\->\\Y2\:""\->\\Y3\ ""\->\\Y5\:""\->\\Y6\ 100\->\S Repeat S\<=\0 ClrDraw S\^-1\\->\S 0\->\W For(I,1,N) W\->\V I/N\->\W (\(-)\\L3\(I)VW\^2\-\L3\(I+1)V\^2\W-(V\^3\\L1\(I+1)-W(3V\^2\\L1\(I+1\#\ )-3VW\L1\(I)+W\^2\\L1\(I)))N)N\^2\\->\A \Y1\\->\K \(-)\(\L3\(I)W\X2t\+V(\L3\(I+1)\Y2t\-6WK))N\^3\\->\B (\L3\(I)\Y2t\+\L3\(I+1)\X2t\-3K(V+W))N\^3\\->\C (\L3\(I)+\L3\(I+1)+2KN)N\^2\\->\D (\(-)\\L4\(I)VW\^2\-\L4\(I+1)V\^2\W-(V\^3\\L2\(I+1)-W(3V\^2\\L2\(I+1\#\ )-3VW\L2\(I)+W\^2\\L2\(I)))N)N\^2\\->\E \Y4\\->\K \(-)\(\L4\(I)W\X2t\+V(\L4\(I+1)\Y2t\-6WK))N\^3\\->\F (\L4\(I)\Y2t\+\L4\(I+1)\X2t\-3K(V+W))N\^3\\->\G (\L4\(I)+\L4\(I+1)+2KN)N\^2\\->\H For(T,V,W,S) Pt-On(\X1t\,\Y1t\) End End Pause Input "FREQUENCY=?",S End Text(0,0,"(C) 1994 MIKAEL BONNIER") Text(57,0,"LUND, SWEDEN") ""\->\\X1t\:""\->\\Y1t\ ""\->\\X2t\:""\->\\Y2t\ ""\->\\Y1\:""\->\\Y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