[TIB] Re: Just a couple of questions


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

[TIB] Re: Just a couple of questions




Your idea is ingenuous for a z80 calc, but the 68k calcs have a better way 
to do that.

To store the picture at first, use this:

:StoPic PICVAR[,PXLROW,PXLCOL][,WIDTH,HEIGHT]

Or [2nd][F7][8] on the graph screen, then selecting the pic you want.

Then to recall it anywhere on the screen, use one of these:

:RclPic PICVAR[,PXLROW,PXLCOL]
(Won't erase black dots underneath where pic is placed)

:RplcPic PICVAR[,PXLROW,PXLCOL]
(Will erase black dots underneath where pic is placed)

:XorPic PICVAR[,PXLROW,PXLCOL]
(Inverts the pixels at locations of black dots in pic)

:AndPic PICVAR[,PXLROW,PXLCOL]
(I believe this makess dots black only when they are black before and after 
the picture is on)

That should take less time and space than the method below.

Robert Mohr
rmohr2002@hotmail.com



>From: "Bradley Achorn" <achorny1011@hotmail.com>
>Reply-To: ti-basic@lists.ticalc.org
>To: ti-basic@lists.ticalc.org
>Subject: [TIB] Re: Just a couple of questions
>Date: Fri, 21 Sep 2001 17:09:29 -0400
>
>
>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
>
>
>


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