The new coordinates (X,, Y,) of a point in the x-y plane that is rotated about the

Question:

The new coordinates (X,, Y,) of a point in the x-y plane that is rotated about the z axis at an angle e (positive is clockwise) are given by
Xr, = X0cosθ- Y0sinθ
Yr, = X0sinθ + Y0cosθ
where (X0, Y0) are the coordinates of the point before the rotation. Write a user-defined function that calculates (X7, Y7) given (X0, Y0) and e. For function name and arguments, use [xr , yr] =rotation (x, y, q), where the input arguments are the initial coordinates and the rotation angle in degrees and the output arguments are the new coordinates.
(a) Use rotation to determine the new coordinates of a point originally at (6.5, 2.1) that is rotated about the z-axis by 25°.
(b) Consider the function y = (x -7)2 + 1.5 for 5 < x < 9. Write a program in a script file that makes a plot of the function. Then use rotation to rotate all the points that make up the first plot and make a plot of the rotated function. Make both plots in the same figure and set the range of both axes at 0 to 10.
Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: