C++ PROGRAM TO CONVERT CARTESIAN COORDINATES TO POLAR COORDINATE

In mathematics, a Cartesian coordinate system is a coordinate system that specifies each point uniquely in a plane by a set of numeric points.

Cartesian Coordinates is represented by (x,y).

In mathematics, the polar coordinate system is a two-dimensional coordinate system in which each point on a plane is determined by a distance from a reference point known as radius and an angle from a reference direction known as theta or simply angle.

Polar Coordinates system is represented by (r,θ).

For the negative value of r in polar coordinates, what to do? Watch the given below youtube video to cover it.

Fig: Polar Coordinates

Check this website for more knowledge: https://openstax.org/books/calculus-volume-2/pages/7-3-polar-coordinates

C++ PROGRAM :

DEFINE TWO CLASSES POLAR AND RECTANGLE REPRESENT POINTS IN POLAR AND RECTANGULAR SYSTEM. USE SUITABLE MEMBER FUNCTIONS TO CONVERT FROM ONE SYSTEM TO ANOTHER. WRITE A PROGRAM TO TEST ABOVE CLASSES.

INPUT – OUTPUT :

FAQ:

1> How do you convert from Polar to Rectangular?
=> To convert from Polar Coordinates (r,θ) to Cartesian Coordinates (x,y) :

2> How do you convert from rectangular to polar form?
=> Using Pythagoras Theorem, To convert from Cartesian Coordinates (x,y) to Polar Coordinates (r,θ).

Step 1: Square both sides of r = 5 and substitute for r^2.
r^2 = x^2 + y^2

Step 2: Determine the value of tan θ and equate this to y/ x .

tan θ = y/x

3> What is Polar and Cartesian coordinate?

Using Rectangular coordinates, or cartesian coordinates we mark a point by how far along and how far up it is.

fig: Cartesian coordinate diagram

Using Polar Coordinates we mark a point by how far away, and what angle it is.

fig: Polar coordinate diagram
fig: Polar and Cartesian coordinate diagram

YOU MIGHT LIKE:

Leave a Reply

Your email address will not be published. Required fields are marked *

Close Bitnami banner
Bitnami