This section is from the document '/pub/list_archives/calc-ti.archive/calc-ti-9412'.

From owner-calc-ti Sun Dec  4 22:12:43 EST 1994 remote from ds
Received: by ds.internic.net; Sun Dec  4 22:12:37 EST 1994
Received: from AUVM.AMERICAN.EDU by AUVM.AMERICAN.EDU (IBM VM SMTP V2R2)
   with BSMTP id 8828; Sun, 04 Dec 94 22:11:24 EST
Received: from AUVM.AMERICAN.EDU (NJE origin NETNEWS@AUVM) by AUVM.AMERICAN.EDU
 (LMail V1.2a/1.8a) with BSMTP id 1309; Sun, 4 Dec 1994 22:11:24 -0500
To:  CALC-TI@LISTS.PPP.TI.COM
Path:
 auvm!paladin.american.edu!news.dell.com!swrinde!howland.reston.ans.net!vixen.cs
 o.uiuc.edu!prairienet.org!lilprog
From: lilprog@prairienet.org (robert m. gardner)
Newsgroups: bit.listserv.calc-ti
Subject: Calc-TI - DRAW FOR the 81, and The DRAWPIC library for the 81
Date: 5 Dec 1994 02:00:50 GMT
Organization: University of Illinois at Urbana
Lines: 101
Message-ID: <3bts8i$7ei@vixen.cso.uiuc.edu>
NNTP-Posting-Host: firefly.prairienet.org
Sender: owner-calc-ti@dsmail.internic.net
Precedence: bulk
Reply-To: lilprog@prairienet.org (robert m. gardner)


            Draw program and drawpic command for ti-81



    This is a simple little draw program to help with graphics. In order to do
this you must have matrix a set at 6,6 and all zeros. Then run the program.
Draw what you want, and when you are done turn the calc off. When you run the
program again it will replot your picture. You can clear your graph and still
save your picture, because its saved in the matrix. To change which matrix to
save it to go in the draw program nd change all the [a]`s to [b]`s etc...


:clrdraw
:0^f
:a^x
:1^y
:0^xmin
:95^xmax
:0^xscr
:0^ymin
:63^ymax
:0^yscr
:lbl b
:if [a](x,y)=1
:pt-on(x+45,y+29)
:if x+y=12
:goto a
:f+1^f
:if y=6
:x+1^x
:if y=6
:1^y
:y+1^y
:line(45,29,45,36)
:line(45,29,52,29)
:line(52,29,52,36)
:line(52,36,45,36)
:goto b
:lbl a
:input
:if x-45>6
:goto a
:if y-29>6
:goto a
:pt-chg(x,y)
:if [a](x-45,y-29)=1
:goto c
:1^[a](x-45,y-29)
:goto a
:lbl c
:0^[a](x-45,y-29)
:goto a





    Here is the disppic command. here is a generic example

variables

a - x coordinate to display picture at
b - y coordinate to display picture at
k - Which matrix picture is stored in(k=1,[a])(k=2,[b])(k=3,[c])


Example program


To display your picture at point(a,b)



prgm2




then in program2  enter the following lines.






:1^x
:1^y
:lbl a
:if k<>1      /* does not equal */
:goto 1
:if [a](x,y)=1
:pt-on(x+a,y+b)
:lbl 1
:if k<>2
:goto 2
:if [b](x,y)=1
:pt-on(x+a,y+b)
:lbl 2
:if k<>3
:goto 3
:if [c](x,y)=1
:pt-on(x+a,y+b)
:lbl 3
:if x+y=12
:end
:if y=6
:x+1^x
:if y=6
:1^y
:y+1^y


--
__________________________________________________________________
| Lilprog               | Master ti-81 programmer|basketball     |
|Little programmer      | I have made :          |player         |
|lilprog@prairienet.org |skeetball               |---------------|

.
