In the image below, I have a Google Earth-based application I am working on and a specific requirement is to calculate the bounds of a drawn polygon given the center($P$) coordinates $(a,b)$, radius($r$) and coordinates of one point $(x,y)$. I also have the bearing (angle) of the radius between the center coordinate and the point $(x,y)$. I need to figure out how to calculate the coordinates of the other points $I$, $J$, and $K$. I will limit the question to just a rectangle for simplicity's sake.
I know how to use Pythagoras' theorem and some basic algebra to calculate the values I want given a polygon that is perfectly level or at a 90 degree angle to the equator, but the bearing thrown into the mix is giving me a very hard time. I know p and q seem to be perpendicular to the equator (bearing 0 degrees) in the example, but it's actually 0.6* degrees and may be any value between 0 and 359.