Question: Two distances are required to specify the location of a point relative to an origin in two-dimensional space (Figure): The horizontal and vertical distances (

Two distances are required to specify the location of a point relative to an origin in two-dimensional space (Figure):

IV II


  • The horizontal and vertical distances ( x . y ) in Cartesian coordinates
  • The radius and angle (r, θ) in radial coordinates.

It is relatively straightforward to compute Cartesian coordinates (x, y) on the basis of polar coordinates (r, θ). The reverse process is not so simple. The radius can be computed by the following formula: r = √ x2 + y2

If the coordinates lie within the first and fourth coordinates (i.e., x > 0), then a simple formula can be used to compute θ

θ = tan – 1 (y/x)

The difficulty arises for the other cases. The following table summarizes the possibilities:

Two distances are required to specify the location of a


(a) Write a well-structured flowchart for a subroutine procedure to calculate r and θ as a function of x and y. Express the final results for θ in degrees.

(b) Write a well-structured function procedure based on your flowchart. Test your program by using it to fill out following table:

IV II

IV II

Step by Step Solution

3.42 Rating (165 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Here is a flowchart for the algorithm Students could implement the function in any number of languag... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (1 attachment)

Word file Icon

45-M-N-A-M-E-A (35).docx

120 KBs Word File

Students Have Also Explored These Related Numerical Analysis Questions!