I'm trying to work out the formula for a hyperbola when I know the coordinates of the foci, and I know at least one point on the hyperbola. I know that the general equation for a hyperbola is:
$ \frac{x^2}{a^2} -\frac{y^2}{b^2} = 1$
where the foci are at $(c,0)$ and $(-c,0)$ and $a^2+b^2=c^2$. But what if the transverse is not aligned with either the x-axis (or y-axis)? I was thinking to apply a translation and rotation, so that I can find the "canonical" hyperbola in terms of $x'$ and $y'$ and then transform back to my original coordinate system:
$x' = (x-a) \cos \theta + (y-b) \sin \theta $
$y' = -(x-a) \sin \theta + (y-b) \cos \theta $
where $(a,b)$ is the translation and $\theta$ is the angle of rotation. Is this headed in the right direction, or is there an easier way?
This is a perfectly good approach. I’ll offer a couple of suggestions that might make your calculations a bit easier.
The center of the hyperbola is, of course, the midpoint of the two foci, so the translation is simple to compute. For the rotation, you don’t need the angle itself, just its sine and cosine, which can be computed directly from the coordinates of the foci. If $C=(F_1+F_2)/2$ is the center point, then the vector $F_1-C$ will point in the direction of one of the principal axes, so if you normalize this vector, its components will be the needed sine and cosine for the rotation. $F_2-C$ would work just as well, of course.