Well...after 1 hour of intense non-stop work, I managed to fix the problem mentioned in the last post by myself (Thanks to KermMartian for motivating me on doing it myself
)
I also optimized the program (Many thanks to Electromagnet8, MateoConLechuga, Michael2_3B, and of course KermMartian for giving me wonderful tips that made this possible).
The original program spanned 500 lines and was around 6000 bytes!
The optimized program now spans around 200 lines and the size is reduced to only 2711 bytes! Geeez!
Further ahead, I request any one of you to try optimize the current program so that it becomes more stable and runs more efficiently without lags.
I know that I shouldn't be asking you guys to do this, but what I did now is the "most" I can do.
I'm doing this simple project just because non of the programs out there do particularly what my program does. This program will surely help people out there those who are scavenging for this program.
Please help me out. Any help will be much appreciated.
Code:
Lbl W
Menu("Select your Tranformation:","Translation",AA,"Reflection",BB,"Rotation",CC,"Dilation",DD,"Exit",Z)
Lbl AA
1→M
ClrHome
Output(1,8,"Translation
Goto ZZ
Lbl BB
ClrHome
Menu("Select your Reflection:","X-axis",B1,"Y-axis",B2,"Y=x",B3,"Y=-x",B4,"Go Back",W,"Exit",Z)
Lbl B1
2→M
ClrHome
Output(1,10,"X-axis
Goto ZZ
Lbl B2
3→M
ClrHome
Output(1,10,"Y-axis
Goto ZZ
Lbl B3
4→M
ClrHome
Output(1,12,"Y=x
Goto ZZ
Lbl B4
5→M
ClrHome
Output(1,11,"Y=-x
Goto ZZ
Lbl CC
ClrHome
Menu("Select your Rotation:","CW 90° (CCW 270°)",C1,"180°",C2,"CCW 90° (CW 270°)",C3,"Go Back",W,"Exit",Z)
Lbl C1
6→M
ClrHome
Output(1,5,"CW 90° (CCW 270°)
Goto ZZ
Lbl C2
7→M
ClrHome
Output(1,11,"180°
Goto ZZ
Lbl C3
8→M
ClrHome
Output(1,5,"CCW 90° (CW 270°)
Goto ZZ
Lbl DD
ClrHome
Menu("Select your Dilation:","From the Origin",D1,"Go Back",W,"Exit",Z)
Lbl D1
9→M
ClrHome
Output(1,6,"From the Origin
Goto ZZ
Lbl ZZ
Disp "","","How many points are there?","
Prompt D
D→dim(L₁
D→dim(L₂
D→dim(L₃
D→dim(L₄
ClrHome
1→B
For(A,1,D
Disp "Point"
Output(B,7,sub("ABCDEFGHIJKLMNOPQRSTUVWXYZ",A,1
B+3→B
If B>9
9→B
Prompt X
X→L₁(A
Prompt Y
Y→L₂(A
End
Goto UU
Lbl UU
If M=1
Goto U1
If M=2
Goto U2
If M=3
Goto U3
If M=4
Goto U4
If M=5
Goto U5
If M=6
Goto U6
If M=7
Goto U7
If M=8
Goto U8
If M=9
Goto U9
Lbl U1
ClrHome
Disp "Move By?","
Prompt X
X+L₁→L₃
Prompt Y
Y+L₂→L₄
Goto ZY
Lbl U2
L₁→L₃
⁻L₂→L₄
Goto ZY
Lbl U3
⁻L₁→L₃
L₂→L₄
Goto ZY
Lbl U4
L₂→L₃
L₁→L₄
Goto ZY
Lbl U5
⁻L₂→L₃
⁻L₁→L₄
Goto ZY
Lbl U6
L₂→L₃
⁻L₁→L₄
Goto ZY
Lbl U7
⁻L₁→L₃
⁻L₂→L₄
Goto ZY
Lbl U8
⁻L₂→L₃
L₁→L₄
Goto ZY
Lbl U9
ClrHome
Output(1,7,"Scale Factor?
Disp "","
Prompt E
L₁*E→L₃
L₂*E→L₄
Goto ZY
Lbl ZY
augment(L₁,{L₁(1→L₁
augment(L₂,{L₂(1→L₂
augment(L₃,{L₃(1→L₃
augment(L₄,{L₄(1→L₄
Goto ZW
Lbl ZW
ClrHome
2→B
Output(1,8,"New Points: "
Disp ""
For(A,1,D
Disp "Point"
Output(B,7,sub("ABCDEFGHIJKLMNOPQRSTUVWXYZ",A,1
Output(B,8,sub("''''''''''''''''''''''''''",A,1
B+2→B
If B>9
9→B
Disp {L₃(A),L₄(A)
End
"
Pause
If M=1
Menu("Plot the Images?","Yes",ZX,"New Points",AA,"Return to Main Menu",W,"Exit",Z)
If M=2
Menu("Plot the Images?","Yes",ZX,"New Points",BB,"Return to Main Menu",W,"Exit",Z)
If M=3
Menu("Plot the Images?","Yes",ZX,"New Points",BB,"Return to Main Menu",W,"Exit",Z)
If M=4
Menu("Plot the Images?","Yes",ZX,"New Points",BB,"Return to Main Menu",W,"Exit",Z)
If M=5
Menu("Plot the Images?","Yes",ZX,"New Points",BB,"Return to Main Menu",W,"Exit",Z)
If M=6
Menu("Plot the Images?","Yes",ZX,"New Points",CC,"Return to Main Menu",W,"Exit",Z)
If M=7
Menu("Plot the Images?","Yes",ZX,"New Points",CC,"Return to Main Menu",W,"Exit",Z)
If M=8
Menu("Plot the Images?","Yes",ZX,"New Points",CC,"Return to Main Menu",W,"Exit",Z)
If M=9
Menu("Plot the Images?","Yes",ZX,"New Points",DD,"Return to Main Menu",W,"Exit",Z)
Lbl ZX
Plot1(xyLine,L₁,L₂,plotsquare)
Plot2(xyLine,L₃,L₄,plotsquare)
DispGraph
ZStandard
Pause
ClrDraw
PlotsOff
Goto W
Lbl Z
ClrHome
Stop