# Circle to tangent mapping

• onako

#### onako

Assume you're given a circle with the line AB containing its center O, such that A and B are on the circle (OA=OB=radius). A tangent t is drawn on the point A, and
I should calculate the mapping of certain points (a,b,c,d...) of the circle to the points on the tangent (at, bt, ct, dt, ...) such that the distance Aa (the distance along the circle) is the same as the distance Aat (the distance along the tangent) (and the same for the distances Ab, Ac, Ad). But, here, certain constraint should be considered: those points of the circle (among (a, b, c, d)) that are from one side of the circle from A to B should be placed on one side of the tangent (the nearer), and those from the other side of the circle form A to B should be placed on the other side. Basically, the circle should be split at B, and then mapped to the tangent. I hope this explanation is sufficient enough.

It should be noted that I have information about coordinates of A, B, O, a, b, c, d. I supposed to calculate (at, bt, ct, dt).
For solving this problem, I have two approaches, but I'm not sure how I could make sure they always work correctly.

1) I calculate the equation of the tangent at point A. Then for each point (a, b, c, d) I calculate the distance from A (along the circle), and use these distances for calculating (at, bt, ct, dt...) along the tangent. What I don't know here is how to calculate the distances
from A to (a, b, c, d). The problem is the 'proper side' determination, meaning how should I determine whether the point should be mapped on one side of the tangent or the other. What would be the way to determine this.

2) I calculate the equation of the tangent at point A. Then for each point (a, b, c, d) I calculate the distance from A (along the circle), and use these distances for calculating (at, bt, ct, dt...) along the tangent. To determine the 'proper side' of a given point, I might use the projection of that point to the tangent. But, even with this, how I know 'which side is which'? Perhaps there are much simpler ways to do this.

Any suggestion on how to do this is welcome. In case I was not precise enough, I'll elaborate.
Thanks.

Since you already know A and a, you should be able to determine the angle AOa (the angle between the radius AO and radius aO).
Given that angle, you can determine the arc length (the distance along the circumference of the circle from A to a).

Since you know the formula for the line passing through A and B, you should be able to tell if a given point is above, or below that line.

Use that information, along with the slope, to determine "which way to go" on the tangent line.

Thanks.
What would be the formula for arc length given the arc endpoints? (the one that incorporates the angle)
Also, it should always calculate the minimum (or always maximum) distance (just following one side of the circle).

You should be able to determine the angle, given the arc end points.
That angle will give you the arc length.

(Note that an angle of 360 degrees correlates to an arc length equal to the circumference of the circle, whereas an angle of 90 degrees correlates to an arc length of 1/4 the circumference of the circle).