Try changing

Code:
Output(1,7,A

To

Code:
Pause A

Hope this helps! Smile
MateoConLechuga wrote:
Try changing

Code:
Output(1,7,A

To

Code:
Pause A

Hope this helps! Smile


Thanks for your efforts but now the "numbers" are appearing at the right side of the screen, way far from the "Point".... Sad
You can avoid the whole moving the point mess altogether by inserting a ClrHome at the start of the For loop, thus making sure that the display is clean and in a known state for each point input. If you need to have it display the points previously entered, you'll have to code around that.


Code:
Input "Amt of Pts? ",D
D->dim(L1
D->dim(L2
For(A,1,D
ClrHome
Disp "Point"
Output(1,7,A
Prompt X                   *I'm using prompt instead of Input for efficiency
X->L1(A
Prompt Y
Y->L2(A
End


If you absolutely have to have it "move" with, you'll need to keep track of which row to output on in a variable and use that instead of "1" in the Output command. In the following code, B is being kept track of. This code hasn't actually been tested, tho, so you may need to adjust the starting point of B and the end-of-screen limit around the If statement inside.


Code:
ClrHome
Input "Amt of Pts? ",D
D->dim(L1
D->dim(L2
2->B
For(A,1,D
ClrHome
Disp "Point"
Output(B,7,A
Prompt X
X->L1(A
Prompt Y
B+3->B
If B>7
7->B
Y->L2(A
End
Alright, so after 4 straight hours of mind blowing work, I successfully made a program that can ONLY find one of the transformation, which is translation:

Have a look at it (Any improvement suggestions will be appreciated):


Code:

ClrHome
ClrList L₁
ClrList L₂
ClrList L₃
ClrList L₄
Output(1,8,"Translation
Disp ""
Disp ""
Disp "How many points are there?"
Disp ""
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,A
B+3→B
If B>9
9→B
Prompt X
X→L₁(A
Prompt Y
Y→L₂(A
End
ClrHome
Disp "Move By?"
Disp ""
Prompt X
X+L₁→L₃
Prompt Y
Y+L₂→L₄
ClrHome
2→B
Output(1,8,"New Points: "
Disp ""
For(A,1,D
Disp "Point"
Output(B,7,A
B+2→B
If B>9
9→B
Disp {L₃(A),L₄(A)
End
"


Question : Since I have stored the values on L1, L2, L3, and L4. I can turn on the plots and view the pre-image as well as the prime-image. But how do I do that from the program itself?
My final Transformation Program:


Code:

Lbl 11
ClrHome
ClrList L₁
ClrList L₂
ClrList L₃
ClrList L₄
Output(1,8,"Translation
Disp ""
Disp ""
Disp "How many points are there?"
Disp ""
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,A
B+3→B
If B>9
9→B
Prompt X
X→L₁(A
Prompt Y
Y→L₂(A
End
ClrHome
Disp "Move By?"
Disp ""
Prompt X
X+L₁→L₃
Prompt Y
Y+L₂→L₄
ClrHome
2→B
Output(1,8,"New Points: "
Disp ""
For(A,1,D
Disp "Point"
Output(B,7,A
B+2→B
If B>9
9→B
Disp {L₃(A),L₄(A)
End
"
Pause
Menu("Plot the Images?","Yes",12,"No",13,"New Points",11)
Lbl 12
Plot1(xyLine,L₁,L₂,plotsquare)
Plot2(xyLine,L₃,L₄,plotsquare)
DispGraph
ZStandard
Pause
ClrDraw
PlotsOff
Goto 11
Lbl 13
ClrHome
Stop


Question : Points are currently being displayed as "Point 1, Point 2, Point 3,.....". Is there are way to make them display the points as "Point A, Point B, Point C,....."???

If this final question is answered then the first phase of my transformation project will be complete.... Smile
Sure, just substitute this line:

Code:
Output(B,7,A

With this one:

Code:
Output(B,7,sub("ABCDEFGHIJKLMNOPQRSTUVWXYZ",A,1

The sub() command takes the string and gets a certain part of it, depending on what A is. Basically, the (A,1) part gets the index at A, and then displays one character. Note that this only works if you have 26 points or less. Hope this helps! Smile

EDIT: Also, by the way, you can chain Disp commands together. So this code:

Code:
Disp ""
Disp ""
Disp "How many points are there?"
Disp ""

Can be:

Code:
Disp "","","How many points are there?","
simple, just use the sub( command. So you would do

:sub("ABCDEFGHIJKLMNOPQRSTUVWXYZ",(variable),1 //(variable) should be replaced with whatever variable has the point number in it

this allows you to have 26 points on your shape. instead of displaying Point (number), it will display Point (letter), and that letter corresponds to the value in (variable). So for example if you had Point 4, this would change it to Point D.
---------------------------------------------------
Also, I'm still working on finishing my program that I posted earlier in this thread, but with school work and all it's a bit slow going. Are you still wanting it or have you figured it out?


EDIT: Also,

Code:

ClrList L₁
ClrList L₂
ClrList L₃
ClrList L₄

can be

Code:

ClrList L₁,L₂,L₃,L₄
[/code]
MateoConLechuga wrote:
Sure, just substitute this line:

Code:
Output(B,7,A

With this one:

Code:
Output(B,7,sub("ABCDEFGHIJKLMNOPQRSTUVWXYZ",A,1

The sub() command takes the string and gets a certain part of it, depending on what A is. Basically, the (A,1) part gets the index at A, and then displays one character. Note that this only works if you have 26 points or less. Hope this helps! Smile

EDIT: Also, by the way, you can chain Disp commands together. So this code:

Code:
Disp ""
Disp ""
Disp "How many points are there?"
Disp ""

Can be:

Code:
Disp "","","How many points are there?","


Thank you very much for your help....Phase 1 Complete !!! Smile

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Michael2_3B wrote:
simple, just use the sub( command. So you would do

:sub("ABCDEFGHIJKLMNOPQRSTUVWXYZ",(variable),1 //(variable) should be replaced with whatever variable has the point number in it

this allows you to have 26 points on your shape. instead of displaying Point (number), it will display Point (letter), and that letter corresponds to the value in (variable). So for example if you had Point 4, this would change it to Point D.
---------------------------------------------------
Also, I'm still working on finishing my program that I posted earlier in this thread, but with school work and all it's a bit slow going. Are you still wanting it or have you figured it out?


EDIT: Also,

Code:

ClrList L₁
ClrList L₂
ClrList L₃
ClrList L₄

can be

Code:

ClrList L₁,L₂,L₃,L₄
[/code]


Thank you very much for helping me out and for the optimization...

Answer to your question: I dont need the complete program from you, so don't stress about it, just help me out to create my own. In this way I will even learn TI BASIC...

Question: So the next phase, phase 2, is to create a reflection program...I want to use the same program pattern used in my translation program. I can code the program, but i just dont know how to set up the "math" for it. Could you please help me out, i just need the code of "math" not the whole program... Smile

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Another nooby question:

So I have the points of the pre-image and prime-image stored to the lists...Since I have them on lists i can easily graph them just by turning on the Plots.

But the problem is that (take a look at the picture), in this example, I have plotted a triangle but it is not complete. Is there a way complete the triangle?



Here is my code:


Code:

Lbl 1
ClrHome
ClrList L₁,L₂,L₃,L₄
Output(1,8,"Translation
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
ClrHome
Disp "Move By?","
Prompt X
X+L₁→L₃
Prompt Y
Y+L₂→L₄
ClrHome
2→B
Output(1,8,"New Points: "
Disp ""
For(A,1,D
Disp "Point"
Output(B,7,sub("ABCDEFGHIJKLMNOPQRSTUVWXYZ",A,1
B+2→B
If B>9
9→B
Disp {L₃(A),L₄(A)
End
"
Pause
Menu("Plot the Images?","Yes",2,"No",3,"New Points",1)
Lbl 2
Plot1(xyLine,L₁,L₂,plotsquare)
Plot2(xyLine,L₃,L₄,plotsquare)
DispGraph
ZStandard
Pause
ClrDraw
PlotsOff
Goto 1
Lbl 3
ClrHome
Stop


Update:

I found this:



Any ideas on how to make the first value re-appear at the bottom?
I'm sure you're smart enough that you can think of a way to append the first element of the list to the end of the list.
KermMartian wrote:
I'm sure you're smart enough that you can think of a way to append the first element of the list to the end of the list.


Thanks for your advice...but unfortunately I just started to get involved in TI BASIC (in fact, I got my first ever calculator about a month ago). So basically I'm a noob.

I understand what you are saying, but the "dim" of the lists is set at the starting of the program...If I'm not mistaken, how is it possible to modify the list and add the first value at the last?

I get what you are saying but I just don't know how to set it up Sad
Reading your post, it sounds like a better question for you to ask is "How do I change the size of a list once it has been created?", correct? The answer is that you can store to the dimension of the list again to change it's size:
- If you shrink the list, items at the end will be deleted
- If you expand the list, 0s will be added at the end.
For example, the following code would expand the size of an existing list L1 by 1 item, adding a 0 at the end:
Code:
1+dim(L1)->dim(L1
KermMartian wrote:
Reading your post, it sounds like a better question for you to ask is "How do I change the size of a list once it has been created?", correct? The answer is that you can store to the dimension of the list again to change it's size:
- If you shrink the list, items at the end will be deleted
- If you expand the list, 0s will be added at the end.
For example, the following code would expand the size of an existing list L1 by 1 item, adding a 0 at the end:
Code:
1+dim(L1)->dim(L1


So after that how do i make it apply the first value of the list to the last value? Pretty Confusing Neutral
Again, you should take a look at a TI-BASIC tutorial, like my book or some of these less-complete but free tutorials. It sounds like your approach to the TI-BASIC language so far has been scattershot at best, and I don't think you're approaching it methodically enough.

What have you already tried to do to apply the first value of the list to the last value? Forgetting programming for a second, and only speaking in terms of lists, how would you do it? For example:
1) Make the list 1 item longer, so that it's 4 instead of 3 elements
2) Figure out the value of the first item of the list
3) Store that value to the last item of the list
KermMartian wrote:
Again, you should take a look at a TI-BASIC tutorial, like my book or some of these less-complete but free tutorials. It sounds like your approach to the TI-BASIC language so far has been scattershot at best, and I don't think you're approaching it methodically enough.

What have you already tried to do to apply the first value of the list to the last value? Forgetting programming for a second, and only speaking in terms of lists, how would you do it? For example:
1) Make the list 1 item longer, so that it's 4 instead of 3 elements
2) Figure out the value of the first item of the list
3) Store that value to the last item of the list


Gotcha Ya !!! Thanks for your efforts and explanation Very Happy Cool Good Idea
Assuming you only have 3 elements in your list, you could do

Code:

L1(1->L1(1+dim(L1

Of course, you don't have to use L1, you can use any List you want Smile

Basically, this code adds 1 element to the list (making that element 0, and making the list 4 elements long), and then it stores the first element of the list to the last element of the list (the 4th element).

Hope this helps!
Michael2_3B wrote:
Assuming you only have 3 elements in your list, you could do

Code:

L1(1->L1(1+dim(L1

Of course, you don't have to use L1, you can use any List you want Smile

Basically, this code adds 1 element to the list (making that element 0, and making the list 4 elements long), and then it stores the first element of the list to the last element of the list (the 4th element).

Hope this helps!


Thanks for your help...I was struggling to figure this out...

I will try the code and return to you... Smile
Indeed, but I'm trying to avoid feeding him the answers so he'll start to think about how to implement these himself. Smile I figure he might even eventually stumble upon the fact that you can use a store to enlarge a list by one element.
Nice explanation Michael2_3B! As an alternative, you can use the augment command to add to the end of a list. For example:

Code:
augment(L1,{L1(1->L1

Will also do what you want. It's a tad smaller; probably not as fast though. The first argument is the list you want to add to, the second is a list, in this case the first element. This is just to aid in learning more useful commands. Smile Good luck; and nice work on sticking with this! Smile
Holy Cow!!! After 8 hours of straight work, my transformation program has come to life. It eventually became a freakin' 500 line program (O_o)....

The program has many duplicate lines and 3/4 of the program is almost repeated...

.8xp Download (made on TI-84+ CSE): http://s000.tinyupload.com/index.php?file_id=95782850888913679988

Any fixes and optimizations will be much appreciated...

Here it is:


Code:

Lbl W                                  //Main Menu starts here
Menu("Select your Tranformation:","Translation",1,"Reflection",2,"Rotation",3,"Dilation",4,"Exit",Z)                         //Main Menu ends here


Lbl 1                               //"Translation" starts here
ClrHome
ClrList L₁,L₂,L₃,L₄
Output(1,8,"Translation
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
augment(L₁,{L₁(1→L₁
augment(L₂,{L₂(1→L₂
augment(L₃,{L₃(1→L₃
augment(L₄,{L₄(1→L₄
ClrHome
Disp "Move By?","
Prompt X
X+L₁→L₃
Prompt Y
Y+L₂→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,sub("''''''''''''''''''''''''''",A,1
B+2→B
If B>9
9→B
Disp {L₃(A),L₄(A)
End
"
Pause
Goto Y


Lbl Y
Menu("Plot the Images?","Yes",X,"New Points",1,"Return to Main Menu",W,"Exit",Z)
Lbl X
Plot1(xyLine,L₁,L₂,plotsquare)
Plot2(xyLine,L₃,L₄,plotsquare)
DispGraph
ZStandard
Pause
ClrDraw
PlotsOff
Goto W                                    //"Translation" ends here


Lbl 2                                        //"Reflection" starts here
ClrHome
Menu("Select your Reflection:","X-axis",21,"Y-axis",22,"Y=x",23,"Y=-x",24,"Go Back",W,"Exit",Z)


Lbl 21
ClrHome
ClrList L₁,L₂,L₃,L₄
Output(1,10,"X-axis
Disp "","","How many points are there?","
Prompt D
D→dim(L₁
D→dim(L₂
D→dim(L₃
D→dim(L₄
1→B
ClrHome
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
L₁→L₃
⁻L₂→L₄
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,sub("''''''''''''''''''''''''''",A,1
B+2→B
If B>9
9→B
Disp {L₃(A),L₄(A)
End
"
Pause
Goto V


Lbl 22
ClrHome
ClrList L₁,L₂,L₃,L₄
Output(1,10,"Y-axis
Disp "","","How many points are there?","
Prompt D
D→dim(L₁
D→dim(L₂
D→dim(L₃
D→dim(L₄
1→B
ClrHome
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
⁻L₁→L₃
L₂→L₄
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,sub("''''''''''''''''''''''''''",A,1
B+2→B
If B>9
9→B
Disp {L₃(A),L₄(A)
End
"
Pause
Goto VA


Lbl 23
ClrHome
ClrList L₁,L₂,L₃,L₄
Output(1,12,"Y=x
Disp "","","How many points are there?","
Prompt D
D→dim(L₁
D→dim(L₂
D→dim(L₃
D→dim(L₄
1→B
ClrHome
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
L₂→L₃
L₁→L₄
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,sub("''''''''''''''''''''''''''",A,1
B+2→B
If B>9
9→B
Disp {L₃(A),L₄(A)
End
"
Pause
Goto VB


Lbl 24
ClrHome
ClrList L₁,L₂,L₃,L₄
Output(1,11,"Y=-x
Disp "","","How many points are there?","
Prompt D
D→dim(L₁
D→dim(L₂
D→dim(L₃
D→dim(L₄
1→B
ClrHome
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
⁻L₂→L₃
⁻L₁→L₄
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,sub("''''''''''''''''''''''''''",A,1
B+2→B
If B>9
9→B
Disp {L₃(A),L₄(A)
End
"
Pause
Goto VB


Lbl V
Menu("Plot the Images?","Yes",U,"New Points",2,"Return to Main Menu",W,"Exit",Z)
Lbl U
Plot1(xyLine,L₁,L₂,plotsquare)
Plot2(xyLine,L₃,L₄,plotsquare)
DispGraph
ZStandard
Pause
ClrDraw
PlotsOff
Goto W


Lbl VA
Menu("Plot the Images?","Yes",UA,"New Points",2,"Return to Main Menu",W,"Exit",Z)
Lbl UA
Plot1(xyLine,L₁,L₂,plotsquare)
Plot2(xyLine,L₃,L₄,plotsquare)
DispGraph
ZStandard
Pause
ClrDraw
PlotsOff
Goto W


Lbl VB
Menu("Plot the Images?","Yes",UB,"New Points",2,"Return to Main Menu",W,"Exit",Z)
Lbl UB
Plot1(xyLine,L₁,L₂,plotsquare)
Plot2(xyLine,L₃,L₄,plotsquare)
DispGraph
ZStandard
Pause
ClrDraw
PlotsOff
Goto W                                           //"Reflection" ends here


Lbl 3                                              //"Rotation" starts here
ClrHome
Menu("Select your Rotation:","CW 90° (CCW 270°)",31,"180°",32,"CCW 90° (CW 270°)",33,"Go Back",W,"Exit",Z)


Lbl 31
ClrHome
ClrList L₁,L₂,L₃,L₄
Output(1,5,"CW 90° (CCW 270°)
Disp "","","How many points are there?","
Prompt D
D→dim(L₁
D→dim(L₂
D→dim(L₃
D→dim(L₄
1→B
ClrHome
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
L₂→L₃
⁻L₁→L₄
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,sub("''''''''''''''''''''''''''",A,1
B+2→B
If B>9
9→B
Disp {L₃(A),L₄(A)
End
"
Pause
Goto VC


Lbl 32
ClrHome
ClrList L₁,L₂,L₃,L₄
Output(1,11,"180°
Disp "","","How many points are there?","
Prompt D
D→dim(L₁
D→dim(L₂
D→dim(L₃
D→dim(L₄
1→B
ClrHome
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
⁻L₁→L₃
⁻L₂→L₄
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,sub("''''''''''''''''''''''''''",A,1
B+2→B
If B>9
9→B
Disp {L₃(A),L₄(A)
End
"
Pause
Goto VD


Lbl 33
ClrHome
ClrList L₁,L₂,L₃,L₄
Output(1,5,"CCW 90° (CW 270°)
Disp "","","How many points are there?","
Prompt D
D→dim(L₁
D→dim(L₂
D→dim(L₃
D→dim(L₄
1→B
ClrHome
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
⁻L₂→L₃
L₁→L₄
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,sub("''''''''''''''''''''''''''",A,1
B+2→B
If B>9
9→B
Disp {L₃(A),L₄(A)
End
"
Pause
Goto VE


Lbl VC
Menu("Plot the Images?","Yes",UB,"New Points",3,"Return to Main Menu",W,"Exit",Z)

Lbl VD
Menu("Plot the Images?","Yes",UB,"New Points",3,"Return to Main Menu",W,"Exit",Z)

Lbl VE
Menu("Plot the Images?","Yes",UB,"New Points",3,"Return to Main Menu",W,"Exit",Z)                        //"Rotation" ends here


Lbl 4                                           //"Dilation" starts here
ClrHome
Menu("Select your Dilation:","From the Origin",41,"Go Back",W,"Exit",Z)


Lbl 41
ClrHome
ClrList L₁,L₂,L₃,L₄
Output(1,6,"From the Origin
Disp "","","How many points are there?","
Prompt D
D→dim(L₁
D→dim(L₂
D→dim(L₃
D→dim(L₄
1→B
ClrHome
Output(1,7,"Scale Factor?
Disp "","
Prompt E
ClrHome
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
L₁*E→L₃
L₂*E→L₄
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,sub("''''''''''''''''''''''''''",A,1
B+2→B
If B>9
9→B
Disp {L₃(A),L₄(A)
End
"
Pause
Goto T


Lbl T
Menu("Plot the Images?","Yes",TA,"New Points",4,"Return to Main Menu",W,"Exit",Z)
Lbl TA
Plot1(xyLine,L₁,L₂,plotsquare)
Plot2(xyLine,L₃,L₄,plotsquare)
DispGraph
ZoomStat
Pause
ZStandard
ClrDraw
PlotsOff
Goto W                                             //"Dilation" ends here


Lbl Z                                                //"Exit"
ClrHome
Stop
Nice job doing the transformations and stuff, but you are repeating A LOT of code throughout your program. It would be better to do something like:

Code:

(Menu)

(Translation code)
Goto EE

(Reflection code)
Goto EE

(Rotation code)
Goto EE

(Dilation code)

Lbl EE   //use whatever label you want
(New points code)
Goto Menu

I don't know what your program flow is exactly (p.s. it gets confusing when you're hopping around with Goto's), but if there is code that is exactly the same for all transformations, you should just do something along the lines of what I wrote above.

Also, I would say to avoid using Labels whenever you can, but since your a noob I think it would be simpler for you to use them right now. Later down the road however, you will probably find yourself using them less often.
  
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 2 of 4
» 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