I was trying to make an explosion animation using letter. It was supposed to spiral out, then kind of cover the screen in a bunch of the letters, but I couldn't get the spiral working in under 10 line of code. Any help shortening it?


Code:

Output(5,13,"0
Output(6,12,"0
Output(7,13,"0
Output(7,14,"0
Output(6,15,"0
Output(5,17,"0
Output(4,16,"0
Output(3,15,"0
Output(3,14,"0



Just add a couple more outputs and there you have it.

What it should look like:

o
o
o
o
o
o
o
o
Imagine those O's in a cicle.

Thats the general gyst of it. It oviouslyy makes a full circle on calc.
Heey Unicorn, what you can do is something like this:

Code:

Radian
0->A     // The polar variable
0->B     // The distance from the midpoint
For(C,1,100
Output(6+round(Bcos(A),0),13+round(Bsin(A),0),"O"
B+.2->B
A+.3->A
End

Of course, you must check for the mininum and maximum values of the screen. This is a simple spiral of "O"'s. I based it on the polar mode. Hope this helps!
May I ask, what C is? Is it just a random variable that equals 0?
How could I make the spiral tighter, and limit how far it goes out?
To make the spiral tighter, just change the part that has B+.2->B and A+.3->A into a smaller number to add to it, like .1 and .2. The distance that it travels out for is changed from the For( loop. The variable C is just a random variable used in the For( loop. Search for what For( does, very useful.
Unicorn wrote:
May I ask, what C is? Is it just a random variable that equals 0?

C could be replaced with any variable. For further explanation: The For( Command
I looked it up a couple of hours ago, thanks for clarifying what I read.
  
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
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement