I am a high school math teacher.

My students and I are programming our TI-83 and TI-83+ calculators to do basic animations. We have figured out how to create and store a picture that can repeatedly be invoked within a program. For example, we have animated an "arrow" moving across the screen toward a "target". The beginning of our program creates the target and stores it using StorePic Pic1, then we can recall it later in a loop in our program. This enables the circles of the target to be represented by the Pic1 and not have to have the calculator redraw the circles each time to create the target but rather, simply redisplay the collection of them repeatedly.

However, what if we want to create and store a picture that we then want to move around the screen. For example, our assignment is to create an animation of a sun rising and then setting.

Here's my question: Is there a way for me to store a representation of a sun (a circle, for starters!) and then use RecallPic in a loop but the RecallPic recalls the picture and puts it at different locations on the screen? Is this possible with a TI-83? Thanks in advance for your help!
There is no automatic and fast way to do it in TI-BASIC, unfortunately.

However, you may want to look at http://tibasicdev.wikidot.com/hexcodes#toc42
which is a small assembly program that shifts the screen.
Unfortunately, no, you cannot manipulate Pic variables. For what you are trying to do, you should really be using sprites (or other fast drawing mechanisms) of which you would need to be using something like the Assembly programming language.

If you’re wanting to stick with TI-Basic though, which is probably a lot simpler with several students, your options are to move the circle around and draw it each time (the drawing of the circle can be slow, though) or create a maximum of 10 pic variables with the circle drawn at the desired locations.
Just to copy what I responded in my email for context for others:

Unfortunately, what you're describing is not possible with pure TI-BASIC. There are things you could do to fake what you're describing, such as drawing an 'O' with large text on the graphscreen (Text(-1,Y,X,"O")), but if you want to move true pictures around the screen, you'll need to use what's called Hybrid BASIC. Hybrid BASIC is the term for using external libraries in your programs, such as the complete set of libraries in xLIB/Doors CS, which works on the TI-83 Plus/TI-84 Plus, but unfortunately not on the non-Plus TI-83. Commands like xLIB's DrawSprite() let you draw a sprite (a small, moveable picture) at an arbitrary location on the screen; the concept underlies a lot of the more responsive games that you'll have no doubt seen for the calculators.
misoloo, Michael2_3B, and KermMaritian,

Thanks so much for these fast and helpful responses! I think for now we will stick to the slow but fine (for now) process of having the calculator redraw the circle at different locations using a loop. Maybe someday we will pursue Hybrid BASIC. Thanks for the help!!
Hello again all,

I thought of this idea as a way to get around my problem. I took Michael2_3B's idea from above and thought, let's store 10 different pictures first, THEN have the program recall each of them in succession. Since the pictures are already formed, the program just recalls them and doesn't have to labor through redrawing them.

Here is the code. But it doesn't seem to work. It stops (and says Quit or Goto) after successfully drawing the first circle. It looks like the calculator has a problem storing each picture to a number based on a variable. Any way to work around this?

0 --> A
For(X, -10, 8, 2)
square root symbol(100 - X^2) --> Y
Circle(X, Y, 2)
A + 1 --> A
StorePic A
ClrDraw
End

Any suggestions? Thanks!

Geoff
Unfortunately, you cannot use a variable like A with the storepic command. You need to have multiple storepic commands with either the numbers between 0 and 9 as arguments or the pic variables Pic0 through Pic9.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement