I've been searching the internet all day for this particular case and can't find a single word on the subject - whether that's my poor searching or the subject is obscure, I do not know. I am also not particularly fluent with mathematical jargon, so forgive my fumbling explanation. Hopefully one of you may re-phrase my problem after I present it.
This Tangent Chord Angle diagram is the closest visual representation I can find for describing my dilemma. I'll be referring to points from this diagram, although it doesn't demonstrate the problem itself, only the starting conditions of my problem.
I have been trying to write a program that will rotate a vector TP from a point T tangent to circle O until that vector essentially describes a chord on the circle (possibly TA if the magnitude of A equals the magnitude of P).
- T, the initial tangent point
- TP, the initial vector from T
- O, the circle on which T lies
- The radius of circle O
I have no clue what to do to get that vector to "fit" inside the circle. I understand there are two possible chords depending on the direction of rotation - I'll be using whichever angle is closer to the vector's original angle.
Again, forgive my inability. I'm afraid it would take considerably longer for me just to learn how to more appropriately describe the problem.