Hi all,

I had been working on a transformation program on Cemetech.net (Those of you who have seen this post on Cemetech, I'm posting it here just because whenever I ask for help, KermMartian (the maker of Cemetech) is like "Buy my book, go do it yourself, and learn how to talk!". This thing really annoys me and pisses me off! Kerm even tried to degrade people who were helping me! Total Braggart! At least people on TI-BD are cooperative!)

All right, back to the topic. So this program, when I first created it was around 6000 bytes. After working on it for almost 3 days, I finally manged to reduce the size of the program to around 1822 bytes…

Could any one of you please help me to optimize this program? Any suggestion will be much appreciated :)

```
Lbl W
Menu("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("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("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("Dilation:","From the Origin",D1,"Custom Origin",D2,"Go Back",W,"Exit",Z
Lbl D1
9→M
ClrHome
Output(1,6,"From the Origin
Goto ZZ
Lbl D2
10→M
ClrHome
Output(1,7,"Custom Origin
Lbl ZZ
Disp "","","Number of Points?","
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
If M=1
Then
ClrHome
Disp "Move By?","
Prompt X
X+L₁→L₃
Prompt Y
Y+L₂→L₄
End
If M=2
Then
L₁→L₃
⁻L₂→L₄
End
If M=3
Then
⁻L₁→L₃
L₂→L₄
End
If M=4
Then
L₂→L₃
L₁→L₄
End
If M=5
Then
⁻L₂→L₃
⁻L₁→L₄
End
If M=6
Then
L₂→L₃
⁻L₁→L₄
End
If M=7
Then
⁻L₁→L₃
⁻L₂→L₄
End
If M=8
Then
⁻L₂→L₃
L₁→L₄
End
If M=9
Then
ClrHome
Output(1,7,"Scale Factor?
Disp "","
Prompt E
L₁*E→L₃
L₂*E→L₄
End
If M=10
Then
ClrHome
Output(1,7,"Scale Factor?
Disp "","
Prompt E
ClrHome
Output(1,4,"Center of Dilation?
Disp "","
Prompt X,Y
L₁-X→L₅
L₂-Y→L₆
L₅*E→L₅
L₆*E→L₆
L₅+X→L₃
L₆+Y→L₄
End
augment(L₁,{L₁(1→L₁
augment(L₂,{L₂(1→L₂
augment(L₃,{L₃(1→L₃
augment(L₄,{L₄(1→L₄
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,"'
B+2→B
If B>9
9→B
Disp {L₃(A),L₄(A)
End
"
Pause
Menu("Plot the Images?","Yes",ZX,"New Points",NP,"Main Menu",W,"Exit",Z
Lbl NP
If M=1
Goto AA
If M≥2 and M≤5
Goto BB
If M≥6 and M≤8
Goto CC
If M≥9
Goto DD
Lbl ZX
Plot1(xyLine,L₁,L₂,plotsquare)
Plot2(xyLine,L₃,L₄,plotsquare)
DispGraph
ZStandard
Pause
ClrDraw
PlotsOff
Goto W
Lbl Z
ClrHome
Stop
```