Point in Circle, Distance to Edge

I'm standing in a circle (Point P), radius of 2000 with a center point 0/0. Then, I'm looking straight to the edge of the circle on a random point (B1 or B2) of the edge. How can I get the distance (f1 or f2) to the point when my rotation/angle is given?

Advanced: What happens if teta is not given, is it still possible to solve it?

Image of Problem

My first tries: Depending on the angle, I'm using sin, cos, tan of my rotation * (the distance to the center point + radius). I tested some numbers and it looks like it's working. Does that makes sense and is there a better solution to solve my problem? It looks like I need several formulas depending on the angle teta and the Position P.

• making sure here: you don't wish to find the point on the circle that's closest to you, but the one you're looking at in a particular direction? – Dan Uznanski Sep 1 '16 at 4:43
• What do you mean by "my rotation is given"? – gambler101 Sep 1 '16 at 4:57
• I recommend drawing a picture. Geogebra is a good tool. It is much easier to understand what you are asking. – Ross Millikan Sep 1 '16 at 5:05
• No, this is not a dupe, I updated my question to make the problem more understandable <3. – The Hero Sep 1 '16 at 10:24
• You are overcomplicating. Extend your line d so that it forms a diameter of the circle. Your picture will then be the same as that in the answer below, and the answer below will give you either f1 or f2. – daniel Sep 1 '16 at 12:21

If I understand you, the situation is shown below. $g=2000$ is the radius of the circle, $r$ is your distance to the center, $\theta$ is the angle from the radius you are on to the direction you are looking. You want to find $f$. First use the law of sines: $\frac g{\sin \theta}=\frac r{\sin \angle ADC}$ to get $\angle ADC$, then $\angle CAD=\pi-\theta-\angle ADC$ and now use the law of cosines $f^2=r^2+g^2-2rg\cos \angle CAD$ 