[TIB] Re: Just a couple of questions


[Prev][Next][Index][Thread]

[TIB] Re: Just a couple of questions




I don't know about TI-89 tutorials, but this is something that I often use 
on my TI-83+ to draw pics at an acceptable rate. I am sure that this is 
portable to other calcs, especially up to the 89. It uses a 2 lists of 
coords. (One list for the X values, one for corosponding Y values). Then it 
uses a for loop to turn on or change the pixels at the point taken from the 
list.

First, however, you need to make the lists. You can enter them by hand, but 
if you have the picture already on the screen, this program creates the list 
for you:

0->dim(LX)      /Use any list name. This stores the X's
0->dim(LY)      /Use any list name. This stores the Y's

For(Y,0,62)
ClrHome
Output(1,1,Y)        /This just diplays progress on the screen
For(X,0,94)          /because this takes a while
Output(1,15,X)       /and I like to see how much is left.
If pxl-test(Y,X)=1:Then    /Sees if the pixel at the current
X->LX(dim(LX)+1)           /X and Y values is on. If so, it
Y->LY(dim(LY)+1)           /stores the coords to the proper lists
End
End:End

Make sure that you change the X and Y values in the for loops so that you 
include the entire picture. And try to get only rows and columns that are 
part of the picture with the for loops because this take quite a while.

Of course, now you want to display this picture. So you need a simple 
program like this:

ClrDraw:FnOff
For(Z,1,dim(LX))
Pxl-On(LY(Z),LX(Z))  /Or change this to Pxl-Change for a twist
End                  /(if you have overlapping stuff)

That's it. This displays the picture exactly as it was stored. And by simply 
adding or subtracting numbers from LY(Z) or LX(Z) than you can move the 
picture all around. If you are crafty enough, you can flip it, or even 
rotate it. (I can give more details on that if you want)

Remeber that for some reason when dealing with Pxl (on the 83+) the Y coord 
goes first.

Of course, this has drawbacks. Storing and drawing something with lots of 
pixels on in it can take up a lot of precious space because of long lists. 
Drawing a picture with about 100 pixels on the 83+ takes about 1-2 seconds. 
While the 89 processor is faster, there are also more pixels. This makes 
constantly redrawing it impractical.

This method is completely my idea, I am quite proud of it however, and you 
can make some neat pictures easily!



----Original Message Follows----
From: "Matthew Waters" <thefishyone@hotmail.com>
Reply-To: ti-basic@lists.ticalc.org
To: ti-basic@lists.ticalc.org
Subject: [TIB] Just a couple of questions
Date: Thu, 20 Sep 2001 19:59:02 -0500

  Does anyone know of a website that keeps tutorials on advanced 89-BASIC?
E-mail me off the list if you do, please. Also, does anyone here know of a
quick way to draw bitmaps onto the screen in 89 BASIC?


---------- The Fishy One's Infinite Wisdom #10: "Catholic school religion
class is like mom's home cooking. Both leave a bad aftertaste and give you
heartburn." New wisdom every week!

----------------------------------------------------------------------------
Get your FREE download of MSN Explorer at http://explorer.msn.com[1]


--- Links ---
    1 'http://go.msn.com/bql/hmtag_itl_EN.asp'



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp