Normally we use Cartesian coordinates. There is no polar coordinates in Flash so we must convert polar to Cartesian coordinates.
To convert we should find X, Y (red lines on illustration). To get them we must project vector p on Cartesian axes,
using following expression: