# Finding the general form for the hyperbola formed by the intersection of a cone and a plane, in the plane of intersection

I have a cone, centred at the origin, aligned with the $$z$$ axis, and so having equation $$x^2+y^2=a^2z^2$$. I also have a general plane, $$px+qy+rz=s$$. Suppose that I know a priori that this plane and cone intersect to form a hyperbola (rather than a parabola or ellipse) in the plane.

If we then define an orthogonal coordinate system $$(X,Y)$$ in the plane, how would I go about finding the equation of the hyperbola in the $$(X,Y)$$ coordinate system, in terms of the parameters $$a,p,q,r,s$$? This seems like it should be a relatively easy problem to solve (especially with computer algebra packages like Mathematica), but I can't seem to work out how to do it.

It's easy enough to get the shape in the $$(x,y)$$ plane by eliminating $$z$$ from the two equations. But how can I project this curve into the $$(X,Y)$$ plane, and get the resulting shape?

My reason for doing this is that, I have a CCD image (which is my $$(X,Y)$$ plane) with curves that I know are formed by such a projection, to which I'm trying to fit hyperbola. All curves should have the same parameters $$p,q,r,s$$ (since the CCD does not move), and I can make a theoretical calculation of $$a$$ based on the setup.

Suppose you eliminated $$z$$ from the two equations of the cone and the plane and obtained an equation of the projection of the hyperbola in the form

$$(u - u_0)^T H ( u - u_0) = 1$$

where $$u = [x, y]^T$$

Given $$u$$ on this projected hyperbola, one can easily find the corresponding $$z$$ from

$$z = \dfrac{ s - p x - q y }{r}$$

Therefore, we define $$r_1 = [x, y, z]^T$$ to be the corresponding point on the hyperbola on the plane then

$$r_1 = r_0 + A u$$

where $$r_0 = \begin{bmatrix} 0 \\ 0 \\ \dfrac{s}{r} \end{bmatrix}$$

$$A = \begin{bmatrix} 1 && 0 \\ 0 && 1 \\ - \dfrac{p}{r} && - \dfrac{q}{r} \end{bmatrix}$$

From this, it follows that

$$u = (A^T A)^{-1} A^T (r_1 - r_0 ) = G (r_1 - r_0)$$

where $$G=(A^T A)^{-1} A^T$$ is $$2 \times 3$$ and has rank $$2$$.

At this point, it useful to introduce the vector $$u_1 = r_0 + A u_0$$

From which it follows that $$u_0 = G (u_1 - r_0)$$

Substituting this into the found hyperbola equation:

$$(G (r_1 - u_1))^T H (G (r_1 - u_1)) = 1$$

So that

$$(r_1 - u_1)^T G^T H G (r_1 - u_1) = 1$$

Now if we attach a local reference frame $$OXYZ$$ to the plane, then

$$r_1 = O + R r_2$$

Therefore, in terms of the local coordinates $$r_2$$ we have

$$( O + R r_2 - u_1 )^T G^T H G ( O + R r_2 - u_1 ) = 1$$

Let's set $$Q = R^T G^T H G R$$, and $$r^* = R^T (u_1 - O)$$, then

$$(r_2 - r^*)^T Q (r_2 - r^*) = 1$$

Finally since we are considering the $$XY$$ plane , then $$Z = 0$$, so setting $$Z=0$$ in $$r_2$$ gives the hyperbola equation in $$X$$ and $$Y$$.