Question: . Write a Python script using NumPy and Matplotlib that does the following tasks: (Assume you are using the triangle from the example with the


. Write a Python script using NumPy and Matplotlib that does the following tasks: (Assume you are using the triangle from the example with the same initial coordinates.) Prompts the user to enter the scaling factors S, and Sy Prompts the user for the rotation angle a. Calculates and displays the coordinates of the transformed coordinates to the screen. Plots a graph of the original triangle and the transformed triangle. The outline of each triangle should be drawn. Your code must work for arbitrary values of scaling factors and rotation angles. The grader will run and test your code to verify that it meets specifications. c Sample output run for your reference: Enter scaling factor Sx: .5 Enter scaling factor Sy: 1.5 Enter rotation angle (deg): 30 Af = [0.0000, 0.0000] Bf = (-0.7500, 1.2990] Cf = [0.4330, 0.2500] 1.75 1.50 1.25 1.00 0.75 0.50 0.25 0.00 -0.5 0.0 0.5 1.0 . Write a Python script using NumPy and Matplotlib that does the following tasks: (Assume you are using the triangle from the example with the same initial coordinates.) Prompts the user to enter the scaling factors S, and Sy Prompts the user for the rotation angle a. Calculates and displays the coordinates of the transformed coordinates to the screen. Plots a graph of the original triangle and the transformed triangle. The outline of each triangle should be drawn. Your code must work for arbitrary values of scaling factors and rotation angles. The grader will run and test your code to verify that it meets specifications. c Sample output run for your reference: Enter scaling factor Sx: .5 Enter scaling factor Sy: 1.5 Enter rotation angle (deg): 30 Af = [0.0000, 0.0000] Bf = (-0.7500, 1.2990] Cf = [0.4330, 0.2500] 1.75 1.50 1.25 1.00 0.75 0.50 0.25 0.00 -0.5 0.0 0.5 1.0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
