Author |
Message |
|
Newbie
Bandwidth Hog
Joined: 23 Jan 2004 Posts: 2247
|
Posted: 17 Feb 2004 04:25:34 pm Post subject: |
|
|
ClrDraw
Line(-5.7,2,5.9,2
Line(-5.9,0,5.9,0
Line(5.9,0,5.9,2
Line(-6,0,-6,2
For(X,1,1000
End
Line(-5.7,0,-5.7,2
Line(-5.5,0,-5.5,2
Line(-5.3,0,-5.3,2
Line(-5.1,0,-5.1,2
Line(-4.8,0,-4.8,2
Line(-4.6,0,-4.6,2
Line(-4.4,0,-4.4,2
Line(-4.2,0,-4.2,2
Line(-4.0,0,-4.0,2
Line(-3.8,0,-3.8,2
Line(-3.6,0,-3.6,2
Line(-3.4,0,-3.4,2
Line(-3.1,0,-3.1,2
Line(-2.9,0,-2.9,2
Line(-2.7,0,-2.7,2
Line(-2.5,0,-2.5,2
Line(-2.3,0,-2.3,2
Line(-2.1,0,-2.1,2
Line(-1.9,0,-1.9,2
Line(-1.7,0,-1.7,2
Line(-1.4,0,-1.4,2
Line(-1.2,0,-1.2,2
Line(-1.0,0,-1.0,2
Line(-.8,0,-.8,2
Line(-.6,0,-.6,2
Line(-.4,0,-.4,2
Line(-.2,0,-.2,2
Line(0,0,0,2
Line(.2,0,.2,2
Line(.4,0,.4,2
Line(.6,0,.6,2
Line(.8,0,.8,2
Line(1,0,1,2
Line(1.2,0,1.2,2
Line(1.4,0,1.4,2
Line(1.7,0,1.7,2
Line(1.9,0,1.9,2
Line(2.1,0,2.1,2
Line(2.3,0,2.3,2
Line(2.5,0,2.5,2
Line(2.7,0,2.7,2
Line(2.9,0,2.9,2
Line(3.1,0,3.1,2
Line(3.4,0,3.4,2
Line(3.6,0,3.6,2
Line(3.8,0,3.8,2
Line(4,0,4,2
Line(4.2,0,4.2,2
Line(4.4,0,4.4,2
Line(4.6,0,4.6,2
Line(4.8,0,4.8,2
Line(5.1,0,5.1,2
Line(5.3,0,5.3,2
Line(5.5,0,5.5,2
Line(5.7,0,5.7,2
Line(5.9,0,5.9,2
How would you if you can shorten this code? I'm trying to make a install effect but this code is too long.
Edit: Those ú things (EDIT BY ARCANE WIZARD: it only takes 7.2 seconds to replace them all with -'s manually!) are negative also how could you make a percent thing that would be below the bar and give a percentage complete and as the bar moved up it would move up?
Last edited by Guest on 17 Feb 2004 04:45:06 pm; edited 1 time in total |
|
Back to top |
|
|
Arcane Wizard `semi-hippie`
Super Elite (Last Title)
Joined: 02 Jun 2003 Posts: 8993
|
Posted: 17 Feb 2004 04:47:05 pm Post subject: |
|
|
Moving up progress bar (example!):
For(X,1,100
Line(5,5,5,5+.1X
End |
|
Back to top |
|
|
Newbie
Bandwidth Hog
Joined: 23 Jan 2004 Posts: 2247
|
Posted: 17 Feb 2004 04:50:22 pm Post subject: |
|
|
how would you get it to move across the screen? |
|
Back to top |
|
|
Arcane Wizard `semi-hippie`
Super Elite (Last Title)
Joined: 02 Jun 2003 Posts: 8993
|
Posted: 17 Feb 2004 04:51:58 pm Post subject: |
|
|
How about you actually try it before you start complaining or asking how to make it work? (because it moves)
Last edited by Guest on 17 Feb 2004 04:52:33 pm; edited 1 time in total |
|
Back to top |
|
|
Newbie
Bandwidth Hog
Joined: 23 Jan 2004 Posts: 2247
|
Posted: 17 Feb 2004 04:55:29 pm Post subject: |
|
|
Tried, but nothing I do works. It,s easy to understand how it goes up, but going across seems more complex. |
|
Back to top |
|
|
Arcane Wizard `semi-hippie`
Super Elite (Last Title)
Joined: 02 Jun 2003 Posts: 8993
|
Posted: 17 Feb 2004 04:56:52 pm Post subject: |
|
|
What did you try, and what happened?
Going accross example:
For(X,1,100
Line(5,5,5+.1X,5
End |
|
Back to top |
|
|
Newbie
Bandwidth Hog
Joined: 23 Jan 2004 Posts: 2247
|
Posted: 17 Feb 2004 04:58:21 pm Post subject: |
|
|
I added to the point one and changed it to 2, interesting design. I tried using commas for like .1,5 to see if it would go across.
Edit: How do you control when it stops? What number is it that controls where it stops?
Last edited by Guest on 17 Feb 2004 05:04:22 pm; edited 1 time in total |
|
Back to top |
|
|
Arcane Wizard `semi-hippie`
Super Elite (Last Title)
Joined: 02 Jun 2003 Posts: 8993
|
Posted: 17 Feb 2004 05:06:15 pm Post subject: |
|
|
It stops where X is the highest, so where it stops can be calculated like so:
5+.1*100 |
|
Back to top |
|
|
Newbie
Bandwidth Hog
Joined: 23 Jan 2004 Posts: 2247
|
Posted: 17 Feb 2004 05:18:08 pm Post subject: |
|
|
I don't get it. |
|
Back to top |
|
|
omni
Member
Joined: 14 Jun 2003 Posts: 115
|
Posted: 17 Feb 2004 05:25:17 pm Post subject: |
|
|
the line is drawn within the for( loop. So after 100 iterations, the loop stops and stops drawing the line. 'X' is the variable that holds the amount of iterations that have occured so far.
--------------
Therefore if it stops after 100 times, then change the number 100.
----------------
Also if you want to change where the line is drawn, change the other cooridinates
change the numbers within the line command
Line(5,5,5+.1X,5 |
|
Back to top |
|
|
Newbie
Bandwidth Hog
Joined: 23 Jan 2004 Posts: 2247
|
Posted: 17 Feb 2004 07:26:40 pm Post subject: |
|
|
Line(-5.7,2,5.9,2
Line(-5.9,0,5.9,0
Line(5.9,0,5.9,2
Line(-6,0,-6,2
I have tried everything but the rectangle I drew I dont know how to fill it using the few lines given, or how to slow it down. |
|
Back to top |
|
|
omni
Member
Joined: 14 Jun 2003 Posts: 115
|
Posted: 17 Feb 2004 07:42:47 pm Post subject: |
|
|
do you understand the command
Line(5,5,5+.1X,5
when it is placed in the for( loop?
"What did you try, and what happened?"-Arcane Wizard
posting the code and telling us what you did will help, as long as it isn't like 1000 lines long. In this case it should be a pretty short routine. |
|
Back to top |
|
|
X1011 10100111001
Active Member
Joined: 14 Nov 2003 Posts: 657
|
Posted: 17 Feb 2004 08:40:49 pm Post subject: |
|
|
Don't give him some code, just explain how to use for( loops.
So when you use that for( loop, it takes x and makes it 1, then it does what's in the loop. then it increases it by 1, and if it's >100, then it stops, and if it's not, it does it again. so Line(5,5,5+.1X,5 is done once for each value of x from 1 to 100. |
|
Back to top |
|
|
Darth Android DragonOS Dev Team
Bandwidth Hog
Joined: 31 May 2003 Posts: 2104
|
Posted: 17 Feb 2004 11:05:35 pm Post subject: |
|
|
you might want to note that because the line command is based off of the graph settings, you might want to defone some so that we are all reading off teh same song page ;)
i use 0 for ymin and xmin, 94 for xmax, and 62 for ymax |
|
Back to top |
|
|
Newbie
Bandwidth Hog
Joined: 23 Jan 2004 Posts: 2247
|
Posted: 18 Feb 2004 05:10:28 pm Post subject: |
|
|
If you were to have a line like an installation bar, how would you get multuple lines to move at the same time?, thats what I dont undersatnd could happen. |
|
Back to top |
|
|
DarkerLine ceci n'est pas une |
Super Elite (Last Title)
Joined: 04 Nov 2003 Posts: 8328
|
Posted: 18 Feb 2004 05:28:14 pm Post subject: |
|
|
Put the commands you want to happen at the same time in the for loop. Also, would help: you would actually know what For( does. |
|
Back to top |
|
|
jtchange
Newbie
Joined: 20 Dec 2003 Posts: 27
|
Posted: 18 Feb 2004 06:24:15 pm Post subject: |
|
|
here is a program that has an installing bar:
Code: 0 -> Xmin
94 -> Xmax
0 -> Ymax
-62 -> Ymin
ClrDraw
0 -> theta
For(I,1,100
For(L,-25,-27,-1 ;this is another loop for the Y coordinates to make things easy
Line(4,L,5+theta,L
.2+theta -> theta
End
End
i tried that out on my calc and it works well. try that... |
|
Back to top |
|
|
Newbie
Bandwidth Hog
Joined: 23 Jan 2004 Posts: 2247
|
Posted: 18 Feb 2004 07:02:06 pm Post subject: |
|
|
Where do you find theta.
Also with the for loop I understand that but I have a problem. . .
[CODE]
For(X,1,100
Line(-5.7,0,5.7=+.1X,0
End
The problem it automatically puts the line from line from -5.7 to 5.7, but does not draw it and adds on from there when all I want is to see the line drawn from -5.7 to 5.7 and then to stop. Whats the problem? |
|
Back to top |
|
|
Adm.Wiggin aka Tianon
Know-It-All
Joined: 02 Jun 2003 Posts: 1874
|
Posted: 18 Feb 2004 07:19:57 pm Post subject: |
|
|
press [Alpha] then press [Ø(theta)](Down by question mark, space, Z etc.) |
|
Back to top |
|
|
Arcane Wizard `semi-hippie`
Super Elite (Last Title)
Joined: 02 Jun 2003 Posts: 8993
|
Posted: 19 Feb 2004 09:08:53 am Post subject: |
|
|
X1011 wrote: Don't give him some code, just explain how to use for( loops.
We've already tried that twice.
Quote: For(X,1,100
Line(-5.7,0,5.7=+.1X,0
End
The problem it automatically puts the line from line from -5.7 to 5.7 I'm surprised you didn't get a syntax error because of the =+. |
|
Back to top |
|
|
|