06-07-2012, 03:49 PM
2 -D TRANFORMATIONS- TRANSLATION & ROTATION
To perform the various 2-dimensional transformations such as translation, rotation.
Algorithm
Step 1: Input the figure.
Step 2: Display the menu as 1.Translation 2.Rotation 3.Exit
Step 3: Get the choice from the user.
Step 4: If the choice is 1 get the translation vector. Add the translation vector to the original coordinate position to move to a new position.
Step 5: If the choice is 2 get the rotation angle. Rotate the figure with respect to the specified angle.
Step 9: If choice is 3 exit the program.