How to convert a line from Cartesian to Polar form?

543 Views Asked by At

I have two points on a $x, y$ axis represented as $P_1(x_1, y_1)$ and $P_2(x_2, y_2)$ for which a line can be computed in Cartesian form $y=mx+b$ with parameters $(m,b)$. I want to be able to represent the same line on Polar coordinate system with parameters $(r,θ)$.

What is the formula to compute the values for $r$ and $θ$ of the line passing points $P_1$ and $P_2$ (or a line represented as $y=mx+b$)?

1

There are 1 best solutions below

2
On

You know:

$$x=\rho\cos(\theta)$$ $$y=\rho\sin(\theta)$$ To find $m$ and $b$ you get the system: $$y_1=mx_1+b$$ $$y_2=mx_2+b$$ So you find $m$ and $b$. The equation in polar coordinates is then: $$\rho\sin(\theta)=m\rho\cos(\theta)+b$$