I'm trying to solve a geometry problem that involves the intersection of two arbitrary spheres in 3D space. The intersection between the two spheres will be a circle in 3d space. I know that this circle will be contained in a plane with normal vector $\vec{a}$, defined as the vector pointing from the center of one sphere to the center of the other, and a point $M$, which is the centre of the circle of intersection, and will be some distance $d$ along $\vec{a}$ (this isn't the meat of the problem, I'm just giving some background). Finally, I find an orthonormal basis for my plane made up of vectors $\hat{u}$ and $\hat{v}%$ ($\hat{u}$ and $\hat{v}%$ have magnitude 1, and are both orthogonal to each other, and $\vec{a}$).
The circle of intersection can then be defined as the following:
$$C(x,y,z) = M + h*cos(t)*\hat{u} + h*sin(t)*\hat{v} $$
where $0 \leq t \leq 2\pi $
So now I have a parameterization of my circle, parameterized to some angle t, and this is where my question really starts. For my problem, I need to find certain points on $C(x,y,z)$ that obey a constraint in either x or y. For example, I may want to find all points in $C(x,y,z)$ such that $x = 5$, or such that $x$ is equal to some arbitrary number $b$. To do this, I look at only one variable in the above equation:
$$C(x) = b = M_x + h*cos(t)*\hat{u_x} + h*sin(t)*\hat{v_x}$$
where $M_X, \hat{u_x}, \hat{v_x}$ are the x components only. I rearrange the equation to look like:
$$\frac{b - M_x}{h} =cos(t)*\hat{u_x} + *sin(t)*\hat{v_x}$$
and then, for simplicity, let $k = \frac{b - M_x}{h}$:
$$k =cos(t)*\hat{u_x} + *sin(t)*\hat{v_x}$$
To solve this equation, I've been using the method described in this post, and it's been yielding correct solutions. The problem is that if I use the method described in that post, it will only give me one solution, when usually there will be two possible solutions for $t$ that satisfy my equation. What modifications can I make to my method such that I find all possible values for t, instead of just one? I have a matlab script running that does this calculation for me, which I can post if that would be helpful. I'd prefer not to use numerical methods in my code, as I'm sure this has an analytical solution.