(Sorry for the seemingly simple question)
I need to find the t value of a set of parametric equations that corresponds to an (x, y) point on the parametric curve. The parametric curve will always be a circle. I'm given:
- The parametric equation will ALWAYS be a circle
- A cartesian point (x, y)
- The radius of the circle
- The point at which the circle is centered (h, k)
- The parametrics will be in the standard parametric circle form:
- x(t) = r*cos(t) + h
- y(t) = r*sin(t) + k
I found the t value corresponding to any point on the circle in quadrants I, II, and IV (and on the axes) easily with arccos() and arcsin(), but I can't find a way to find it for a point in quadrant III.
This is for a program I'm writing, so the best way I have found is to brute-force find the point by starting with t = pi, taking the distance formula between (x(pi), y(pi)) and the given point (x, y), and iterating on t and repeating the distance formula until the distance converges to 0. But, I would like a faster and more direct method, if it exists.