OMG!

May. 17th, 2007 11:42 pm
nikavia: (Default)
[personal profile] nikavia
So i got a B+ in Physics! I am sooooo thrilled. Like words cannot express thrilled. I have no idea how i did it but i did. Anyways. I have started another program on my calculator. For those of you who saw my last animation, you know that this means my fingers are very sore and i can't really thing very well. I started on it in Calculus today because i knew everything we were doing and so i decided to waste my time. Anyways, I wrote up a guide, which is under the cut. It is now time for me to be creative however.
Laters
Nyssa

Idiots guide to programming textual animation in a TI-83 graphing calculator. This method should also work for any other type of TI calculator, but I am not positive about the exact numbers that will give you the same results. The actual program is in red. As a warning, this is very time consuming and requires a lot of button pushing. It is best to start with something simple.
 
Step 1:
Decide what you want to animate. For this example, I will be using the opening text from Final Fantasy VIII:
“I’ll be here.
Why…?
I’ll be waiting… here…
For what?
I’ll be waiting… for you… so
If you come here…
You’ll find me.
I promise.
Fithos Lusec Wecos Vinosec
Final Fantasy VIII”
 
Step 2:
Decide how you are going to break up the text. In the example I am using it is easy because everything was able to fit on one line. However in the new one I am doing, which some lines from Kingdom Hearts, I have to break up the text into smaller parts, meaning I have to make more lines appear on a screen.
 
Step 3:
Break the lines up into frames. I draw little pictures to help me with this part but really it is whatever helps you best, from writing it down to sketching it. I knew what was going to appear on each screen (each line of the above is one screen) and how many screens I would need (10).
 
Step 4:
Create a simple program that will plot out all of the lines onto one screen for reference and so you can center each line individually.
The best way to start a program is to clear everything, from functions to the axes to the screen.
PROGRAM:FFVIII
:FnOff
:ClrDraw
:AxesOff
“FnOff” will turn off any “Y=” data saved. It is found by pushing “VARS” then clicking over to Y-VARS and down to option 4:On/Off.
“ClrDraw” clears the drawing, and it’s use will become more apparent later in the program. It is found by pushing [2nd] Pgrm which will take you to the “Draw” menu. It is option number 1.
“AxesOff” makes the axes go away, as other wise they will be drawn on you screen and interfere with the images. This is found by pushing [2nd] Zoom, which will take you to the “Format” screen. Simply click over to “AxesOff”.
:250 (STO) K
“STO” is actually a right pointing arrow, but I can’t display that, so whenever (STO) appears, it means push the STO button. These values are needed for later for loops.
:Text(0,0, “ILL BE HERE…”)
:For(T,1,K)
:End
“Text” is found button is found under the “Draw” menu ([2nd] Prgm) and is option number 0. The first value is the Y coordinate of the first letter of the text, the second value is the x value of the first letter of your text and the text is entered in quotes.
The “For” command is always paired with the “End” command. Both are found under the Prgm menu. “For” is listed at number 4 and “End” is number 7. The first value in the “For” command is always a variable. It can be the same variable throughout the program. The second value is the start number and the third value is the variable that we stored a value for at the beginning (K=250). This For Loop will cause the calculator to pause and count from 1 to 250. There is an optional and superfluous 4th number (not included) that will tell the increment the counting is to be done by. It has been left out of the program. At the conclusion, always enter the “End” command.
:ClrDraw
:Text(10,0,”WHY…?”)
:For(T,1,K)
:End
The ClrDraw will clear the screen, and begin to create the animation. Then the next line of text is entered. The For loop allows the viewer to read the text before the ClrDraw takes effect and clears the screen. I have found that 250 works quite well for this number but if the calculator is faster, a larger number may be needed.
Continue the above process until each line has been entered, incrementing the first value in the “text” command by 10 each time.
 
Step 4:
Center each line. It may be necessary to remove the ClrDraw from the program at this point. To center a line, simply change the second value of the “Text” command.
For example my text command will be changed from
:Text(0,0, “ILL BE HERE…”)
To:
:Text(0,27,”ILL BE HERE…”)
Repeat the process until every line is complete. If you have more lines than will fit on a single screen, do what you can and then wait to do the rest until the first set is complete. Copy down these start points for each screen as it will make it much easier.
 
Step 5:
Now it is time to animate a single line. Create a new program. Mine were all named after the original program with letters attached to the end of them.
PROGRAM: FFVIIIA
:ClrDraw
:30 (STO) N
:Text(18,27,”ILL BE HERE…”
:Text(28, 27, “I”)
:For (T,1,N)
:End
The N value will be erased at the completion of the program. This is the time consuming part of the animation. Each letter, in order to create a fade in effect, must be animated individually. The first Text command is for comparison, to make sure everything is lining up correctly and will also be deleted at the end. The first letter of my first line is “I” so the second “Text” command only contains “I” within it. The first value in the second “Text” command has changed from 0 to 28. 28 is the vertical center of a TI-83 screen, so the line of text is now centered. The first value in the first “Text” command is 18 so it will line up horizontally but will stay out of the way of the animation. The second value is the number that should have been copied from the original program to center the line horizontally.
:Text(28, 27, “I”)
:For (T,1,N)
:End
:Text(28, 31, “L”)
:For (T,1,N)
:End
:Text(28, 35, “L’)
:For (T,1,N)
:End
:Text(28, 40, “B”)
:For (T,1,N)
:End
:Text(28, 44, “E”)
:For (T,1,N)
:End
:Text(28, 49, “H”)
:For (T,1,N)
:End
:Text(28, 53, “E”)
:For (T,1,N)
:End
:Text(28, 57, “R”)
:For (T,1,N)
:End
:Text(28, 61, “E”)
:For (T,1,N)
:End
:Text(28, 65, “.”)
:For (T,1,N)
:End
:Text(28, 67, “.”)
:For (T,1,N)
:End
:Text(28, 69, “.”)
:For (T,1,N)
:End
There are no ClrDraws between letters but there is a For loop to create the illusion of fading in letters. They will scroll across the screen. Each letter needs the second value of the Text command to increase by 4, unless it is punctuation or a space between words. If it is a space, the increase is by 5. If it is punctuation, the increase is by 2.
Run the program to make sure everything is working correctly. If it isn’t, go back and debug. If it is, delete the first “Text” command which contains the entirety of the line as well as the “30 (STO) N” line of text as they are no longer needed.
This concludes the first line of the animation.
 
Step 6:
Now repeat with all the lines in separate programs. Maintain some way of keeping them in order and debug as you go along. Don’t save anything for the end. Mine were all named FFVIIIA, FFVIIIB, FFVIIIC, FFVIIID, FFVIIIE, FFVIIIF, FFVIIIG, FFVIIIH, FFVIIIK, and FFVIIIJ. The last two are out of order because I decided to add a line of text into the program that I had not originally planned on entering.
 
Step 7:
Putting it all together is easy. Go back into your original program. It is now time to rewrite it. Keep the first part:
PROGRAM:FFVIII
:FnOff
:ClrDraw
:AxesOff
And underneath that add:
:30 (STO) N
This will be maintained throughout all of the subprograms, which will be loaded in a moment.
:250 (STO) K
:prgmFFVIIIA
:For(T,1,K)
:End
:ClrDraw
As a refresher, this “For” command will be used to delay between lines of text. To load another program simply press “PRGM” and click over to “EXEC” and select the program. There may be redundant ClrDraws, but with animations, it is better to be safe then to de bug it over and over. The rest of the program consist of loading all the subprograms with a delay and a ClrDraw between each.
 
Now you have a beautiful program, and something to do during class.
Happy Programming.

Profile

nikavia: (Default)
nikavia

September 2010

S M T W T F S
   1234
567891011
12131415161718
192021 22232425
2627282930  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 4th, 2025 09:11 am
Powered by Dreamwidth Studios