You will write three functions for a turn of the axes through an angle given in degrees.
The idea. New from old: and . The new coefficients of are , and . The term in goes when .
Your tasks.
turn_point(x, y, deg). Return (X, Y).new_coeffs(a, h, b, deg). Return (a2, h2, b2).remove_xy(a, h, b). Return the angle in degrees, using math.atan2(2 * h, a - b) / 2.Run your code once to unlock the worked solution.
Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…