Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
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
Jedd
1980 Pong World Champion


Elite


Joined: 18 Nov 2003
Posts: 823

Posted: 23 Nov 2003 07:46:47 pm    Post subject:

With the Line( command you can draw a line or erase it by placing a 0 after the X,Y,X,Y coordinates. If i want to clear an entire vertical (or horizontal) line, do I have to use a really big line (Line(30,-100,30,100,0) or can I somehow use the Vertical line command to do this? I tried Vertical 30, 0, but it didn't work.
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 23 Nov 2003 08:51:56 pm    Post subject:

I think the only way is Line(30,Ymin,30,Ymax,0). Oh, and are the Vertical/Horizontal commands faster than corresponding Line( commands?
Back to top
Jedd
1980 Pong World Champion


Elite


Joined: 18 Nov 2003
Posts: 823

Posted: 23 Nov 2003 09:38:53 pm    Post subject:

I never even thought of using Xmax and Ymax to draw lines. Pretty obvious now that you mention it. Thanks robin!
Back to top
Spyderbyte


Advanced Member


Joined: 29 May 2003
Posts: 372

Posted: 23 Nov 2003 10:11:44 pm    Post subject:

Sir Robin wrote:
I think the only way is Line(30,Ymin,30,Ymax,0). Oh, and are the Vertical/Horizontal commands faster than corresponding Line( commands?

I belive they are, and even if they aren't, they're a ton smaller.

Spyderbyte
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 24 Nov 2003 07:08:40 am    Post subject:

With the Line statement the calc has to use 4 inputted variables, with the Vertical or Horizontal statements there is only 1, the rest is part of the function (assembly code). In most cases this means the latter is faster.
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 24 Nov 2003 04:01:25 pm    Post subject:

I checked it: the Line command is 55% slower... But it can turn off the pixels!
Back to top
Jedd
1980 Pong World Champion


Elite


Joined: 18 Nov 2003
Posts: 823

Posted: 24 Nov 2003 07:49:39 pm    Post subject:

How did you get 55%?
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 25 Nov 2003 09:08:23 am    Post subject:

Time both methods and calculate how much of the faster the slower is slower.

example:
line: 15,5 secs
horizontal: 10 secs

15,5/10*100%=155% hence line is 55% slower.
Back to top
Jedd
1980 Pong World Champion


Elite


Joined: 18 Nov 2003
Posts: 823

Posted: 25 Nov 2003 10:46:05 am    Post subject:

Oh ok. But im assuming you obviously drew line and horizontal multiple times? Because it doesnt take my calculator 15 seconds to draw a horizontal line...
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 25 Nov 2003 11:22:54 am    Post subject:

For(X,1,250
Line(0,31,94,31
End

For(X,1,250
Vertical 31
End
Back to top
Jedd
1980 Pong World Champion


Elite


Joined: 18 Nov 2003
Posts: 823

Posted: 27 Nov 2003 05:57:21 pm    Post subject:

gotcha
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 27 Nov 2003 07:33:43 pm    Post subject:

I never said anything about 15 seconds. I just drew each once, estimated the Line( speed at 51,67 milliseconds and the Vertical speed at 33,33 milliseconds, then divided and converted to a percent.
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 28 Nov 2003 09:15:28 am    Post subject:

Sir Robin wrote:
I never said anything about 15 seconds.

Quote:
EXAMPLE:
line: 15,5 secs
horizontal: 10 secs

15,5/10*100%=155% hence line is 55% slower.


Last edited by Guest on 28 Nov 2003 09:15:49 am; edited 1 time in total
Back to top
DarkerLine
ceci n'est pas une |


Super Elite (Last Title)


Joined: 04 Nov 2003
Posts: 8328

Posted: 28 Nov 2003 03:05:05 pm    Post subject:

I was talking about Jedd's post.
Quote:
Oh ok. But im assuming you obviously drew line and horizontal multiple times? Because it doesnt take my calculator 15 seconds to draw a horizontal line...
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 GMT - 5 Hours

 

Advertisement