ti 84 graphic output unstable at program start


on ti 84 plus I ran this program ( where "STO in" (arrow to the right) command is shown as [STO>]:

:(Xmax-Xmin)/94.0000007499999[STO>]A
:ClrDraw
:While 1
:Prompt X
:2[STO>]Y
:Pt-On(X,Y)
:Pt-On(X-A,Y)
:Pt-On(X+A,Y)
:Pause
:End

when I enter a value say -5 for X I get one point
every next time I enter -5 for X I get three nice points on a row
How is that possible?

the program:

:(Xmax-Xmin)/94.0000007499999[STO>]A
:ClrDraw
:While 1
:Prompt X
:Pt-On(X,2)
:Pt-On(X-A,2)
:Pt-On(X+A,2)
:Pause
:End

doesn`t do that, here always three points on a row.
is there a similar problem with ti 84 plus CE?

I have a temporary solution to the problem, add:

:Pt-On(1,1)

right at the beginning of the program, but it isn`t fine.
Traditionally, we advise TI-BASIC programmers avoid using the X and Y variables and the graph screen at the same time, because being on the graph screen influences the variables in somewhat unexpected ways. Perhaps use I and J as your variable pair instead?
Thank you, that solves the matter. greetings
In:

:While 1
:5[STO>]X
:2[STO>]Y
:Pt-Change(X,Y)
:Pt-Change(X,Y)
:Pause
:End

it for the first time of use of writing an X,Y point to the screen it uses the variables, but it then makes the value of Y to zero. Thus the second time it writes a point to 5,0. It does this only once, since Y is made 2 again after the Pause and now it`s stable.
Then, after it had been used, it behaves like an ordinairy variable, thus making the value of Y to 2 and this stays this way.
Interesting is that, as soon as anything happens on the graphic screen, it than from that time on it uses the Y as an ordinairy variable without turning to zero anymore.
With a little addition on other programs in this way you can easily detect if there was any writing to the screen during that the program ran. Is this reliable?
It is simple: when you see the two dots changed there was no writing to the graphic screen, if you see not the specific dots changed there was a writing to the graphic screen so you may look for that. It won`t work if you did not ClrDraw before or at the beginning of the program, so it is only helpfull if you are looking for tiny dots somewhere on the screen or if there has been some writing towards an area outside of the field of the screen.

The addition would be:

:5[STO>]X
:2[STO>]Y
:Pt-Change(X,Y)
:Pt-Change(X,Y)

so if you ran out of normal variables and you need the X and Y for this purpose than you know how to proceed, You`ll have to write some data first with (X,Y) twice and only then you can define and use these variables. that it works smooth is not completely sure though.
  
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