Heey, I made a program for math, but this is pretty slow.
Can someone please take a look if he sees some optimization? Tanx! This draws a slope field.

Code:

{0->L1
{0->L2
0->R
ClrHome
While R!=7
ClrHome
Disp "--------------------------"," AY^^2"," AY"," AT"," AT^^2"," A"," STOP"
2->R
Repeat Ans=105
If Ans
Output(R,1," "
min(7,max(2,R+sum(DeltaList(Ans={25,34->R
Output(R,1,">"
getKey
End
Input "A=",A
augment(L1,{R->L1
augment(L2,{A->L2
End
~5->Xmin
5->Xmax
~5->Ymin
5->Ymax
ClrDraw
FnOff
For(X,~5,5
For(Y,~5,5
0->A
For(B,2,dim(L1)-1
A+(L1(B)=2)L2(B)Y^^2+(L1(B)=3)L2(B)Y+(L1(B)=4)L2(B)X+(L1(B)=5)L2(B)X^^2+(L1(B)=6)L2(B->A
End
Line(X-.4cos(tan^-1(A)),Y-.4sin(tan^-1(A)),X+.4cos(tan^-1(A)),Y+.4sin(tan^-1(A))  // This must be better
End
End

(Btw, the program didn't draw the line at (-5,-4), (-5,-3), (-5,-2), (-5,-1). Any suggestions?)
Ah, PT, I really think this program could be really useful! As for optimizations, I will have to take a better look at it. I seem to be having an error on the first long line that I'm trying to work out. Nice work though! Smile
  
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