Slope intercept form of line equals:

y = mx + c

xcosθ + ysinθ = P

y - y1 = m(x - x1)