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:
(Btw, the program didn't draw the line at (-5,-4), (-5,-3), (-5,-2), (-5,-1). Any suggestions?)
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?)