This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's TI-BASIC subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. TI-Basic => TI-BASIC
Author Message
Joemama98


Newbie


Joined: 30 Jun 2003
Posts: 7

Posted: 02 Jul 2003 04:44:25 pm    Post subject:

Hello again gentlemen. With pxl-change, lets say:

:For(Y,1,3
:For(X,1,5
:Pxl-Change(Y,X
:End:End

Now when this happens, of course, the pixels change, but they change to slowly for me. So in two questions: Is there a way for pxl-change to occur faster or is there a way to instantly change pixels the second the graphscreen is displayed?
Back to top
yugniht


Member


Joined: 29 May 2003
Posts: 167

Posted: 02 Jul 2003 04:48:29 pm    Post subject:


Code:
For(X,1,5
PxlChange(X,1
PxlChange(X,2
PxlChange(X,3
End


OR


Code:
For(Y,1,3
PxlChange(1,Y
PxlChange(2,Y
PxlChange(3,Y
PxlChange(4,Y
PxlChange(5,Y
End


I think the last one would be the fastest.


Last edited by Guest on 02 Jul 2003 04:49:08 pm; edited 1 time in total
Back to top
Joemama98


Newbie


Joined: 30 Jun 2003
Posts: 7

Posted: 02 Jul 2003 05:19:08 pm    Post subject:

Very Happy Thanks yugniht, while we're still on the topic of fast, is there a another way I could substitute X instead of a number to increase by 1 from 15 to 50?
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 02 Jul 2003 05:25:05 pm    Post subject:

Do you mean like For(X,15,50 ???
Back to top
Joemama98


Newbie


Joined: 30 Jun 2003
Posts: 7

Posted: 02 Jul 2003 05:41:14 pm    Post subject:

yea, but thats the problem. Whenever I use the For(X like that, the pxl-change is way to slow
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 02 Jul 2003 07:56:04 pm    Post subject:

im not sure, but u might try:

Code:
15->X
Repeat X=50
Pxl-Change, blah, blah
X+1->X
End


it might be faster cuz i find repeats and whiles to be generally faster than fors, but i may be wrong.
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 03 Jul 2003 02:06:22 pm    Post subject:

well, first of all, it is Pt-Change, pxl-Change would look like this :
Code:
If Pxl-Test(X,Y:Then:PxlOff(X,Y:Else:PxlOn(X,Y:End
just thought id clear that up right away Wink

now, i dont know if using repeat would be faster, but i would guess so, did u try it yet? tell us the results plz!
Back to top
Jeffrey


Member


Joined: 12 Jun 2003
Posts: 212

Posted: 03 Jul 2003 05:36:45 pm    Post subject:

Quote:
well, first of all, it is Pt-Change, pxl-Change would look like this :CODE 
If Pxl-Test(X,Y:Then:PxlOff(X,Y:Else:PxlOn(X,Y:End


Huh? Why not just use pxl-change? That seems like it would be longer.


Last edited by Guest on 03 Jul 2003 05:37:46 pm; edited 1 time in total
Back to top
Justin W.
Shattered Silence


Advanced Member


Joined: 24 May 2003
Posts: 429

Posted: 03 Jul 2003 07:09:58 pm    Post subject:

Yes you are correct Jeffery. A routine such as Adm. Wiggin's takes even longer than a For( loop. One of the best ways to change pixels' fast is to use asm...
Back to top
yugniht


Member


Joined: 29 May 2003
Posts: 167

Posted: 03 Jul 2003 07:11:21 pm    Post subject:

Adm. Wiggin: you made a mistake, you said
Quote:
PxlChange(X,Y
When it's
Quote:
PxlChange(Y,X

You probably knew but didn't think about it.
Back to top
JesusFreak
JesusFreak


Active Member


Joined: 17 Jun 2003
Posts: 537

Posted: 03 Jul 2003 11:00:59 pm    Post subject:

if it is a line do
(X,Y,A,B,0
(a and b the ending cords, will turn them off and without the 0 is on
Back to top
Justin W.
Shattered Silence


Advanced Member


Joined: 24 May 2003
Posts: 429

Posted: 04 Jul 2003 12:03:59 am    Post subject:

Ummm.... JesusFreak. That only turns the lines on or off not inverting them.
Back to top
JesusFreak
JesusFreak


Active Member


Joined: 17 Jun 2003
Posts: 537

Posted: 04 Jul 2003 12:06:07 am    Post subject:

in effect is that not what pxl-change does??
Back to top
Justin W.
Shattered Silence


Advanced Member


Joined: 24 May 2003
Posts: 429

Posted: 04 Jul 2003 12:20:22 am    Post subject:

No. Pxl-Change( inverts a pixel. If it is black it becomes white, or vice versa.
Back to top
JesusFreak
JesusFreak


Active Member


Joined: 17 Jun 2003
Posts: 537

Posted: 04 Jul 2003 12:50:05 am    Post subject:

all is does is if it is on, turns it off, if off turns it on, so if he wanted a whole line "white" that is all black he can do my thing which is a lot faster than pxl-chg
Back to top
Jeffrey


Member


Joined: 12 Jun 2003
Posts: 212

Posted: 04 Jul 2003 10:12:57 am    Post subject:

Well if he had a line that half of the pixels were on and half were off that would not work. It would just turn off all of the pixels.
Back to top
JesusFreak
JesusFreak


Active Member


Joined: 17 Jun 2003
Posts: 537

Posted: 04 Jul 2003 12:19:39 pm    Post subject:

y didn't they do a pxl-change-line or let pxl-change(Line( work? it would have been so kewl
Back to top
Adm.Wiggin
aka Tianon


Know-It-All


Joined: 02 Jun 2003
Posts: 1874

Posted: 07 Jul 2003 12:01:49 pm    Post subject:

u can in asm... srry bout my post, i didnt ever see the pxl-Change command! i just noticed it after i was grounded from my comp... in asm u can do a few different line, and point things...
Back to top
Display posts from previous:   
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
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement