4

I'm attempting to locate some points (in a 3D coordinate system) on the surface of a cone by slicing the cone with a plane, and using the resultant ellipse, parabola or hyperbola to calculate the points. I've had success with the ellipse & parabola solutions, but am seeking help with the hyperbola case.

Known data: The slope of the cone, the slope of the plane, and distance from the vertex of the cone to the intersection of the plane and cone's longitudinal axis. Given these knowns, I'm looking for "a" & "b".

From reading, I have the formulas x²/a² - y²/b² = 1 & c² = a² + b². I understand distance "a" to be half the distance between the two vertices. Question 1 is, is "a" always half the distance between the two vertices, even when the plane is sloped? If not always half, how is "a" calculated when the plane is sloped? Question 2 is how to determine "b"? Question 3 is how to determine the angle of the asymptotes? ...is that the angle of the cone, or if the plane is sloped, some other angle?

I'm concerned only with the upper nappe of the cone.

As I massage the above formula, attempting to solve for an "x" & "y" & "b", as the plane angle gets shallower, "a" gets longer. And when "a" gets longer than an "x" value that I am using, my solutions fail due to an attempt to take the square root of a negative number. So, I know I'm messing up somewhere. Any help is appreciated.

This is my first post here so I don't know my way around. I'm going to attempt to post a sketch.

Thanks in advance.

WoodGuy
  • 41
  • This is interesting. I will work on this problem when I get home. Can we assume this is a right-angled cone? Or is the interior angle something else? – K.defaoite Jan 02 '21 at 19:11
  • Thank you. It is a right cone. – WoodGuy Jan 02 '21 at 19:13
  • see Dandelin Sphere construction. "A conic section has one Dandelin sphere for each focus. An ellipse has two Dandelin spheres touching the same nappe of the cone, while hyperbola has two Dandelin spheres touching opposite nappes. A parabola has just one Dandelin sphere. " https://en.wikipedia.org/wiki/Dandelin_spheres – Will Jagy Jan 02 '21 at 19:21
  • @WoodGuy This problem is turning out to be harder than I expected. Hopefully I will post something by the end of today. – K.defaoite Jan 03 '21 at 20:31
  • I have now posted a partial answer. – K.defaoite Jan 04 '21 at 03:22
  • Answer updated to include computation of the semi major and semi minor axis. – K.defaoite Jan 04 '21 at 21:26
  • Curious here... are you looking for an equation in two variables with the plane as the coordinate plane (which would have to be tilted to get to xy coordinates) or are you looking for the equations in x,y,z? – Eric Snyder Jan 04 '21 at 21:40
  • I am wanting to define the hyperbola, on a two coordinate plane, so that I can calculate an X coordinate on the curve, given a Y coordinate. It seems my challenge comes from not finding the correct semi-major axis. It's easy to calculate the distance between the two vertices of the hyperbola. Wikipedia says the semi major axis is half that distance, but this does not seem to be producing the correct results. The plane is sloped. – WoodGuy Jan 06 '21 at 13:18
  • I can calculate the distance from the vertex of the hyperbola to the focal point using dandelin spheres, and that, when added to "a" gives "c". And given "a" and "c", I can derive "b". But, again, I think my "a" is wrong. I'm using x²/a² - y²/b² = 1... from Wikipedia. – WoodGuy Jan 06 '21 at 13:27

2 Answers2

1

Here's the plan of attack.

  • Give equations that describe the cone and plane in the standard basis

  • Define "plane coordinates"

  • Find the coordinate transform matrix between the two coordinate systems

  • Find the equation of the conic section in plane coordinates

  • Rotate the coordinate system so our conic is oriented along the coordinate axes and thus find the major and minor axis lengths

Once we have the equation for the conic, there will still be a lot of work before we can get the semi major and semi minor axes, but hopefully someone else can chime in on this matter. First a preface on notation - scalars will be denoted with normal italic font, e.g $s$. Vectors will be denoted with upright (Roman) font, e.g $\mathrm{v}$. Matrices will be denoted with bold, e.g $\mathbf{M}$. With that out of the way, let's get started!


1: Cartesian equations of the plane and cone

First, the plane. Any plane in $\Bbb{R}^3$ is a level surface of a linear polynomial in $x,y,z$. What I mean by this is given $a,b,c\in\Bbb{R}$ we can represent the corresponding plane as $$\mathcal{P}=\{(x,y,z)\in\Bbb{R}^3:ax+by+cz=d\}$$ Yes, apologies on using $a$ and $b$ - I will probably use them again later.

Now, the cone. The upward facing right angled cone is the surface corresponding to $\phi=\pi/4$, in spherical coordinates. The inverse transformation tells us that this means $$\arccos\left(\frac{z}{\sqrt{x^2+y^2+z^2}}\right)=\frac{\pi}{4}$$ Taking the cosine of both sides we see that $$\frac{z^2}{x^2+y^2+z^2}=\frac{1}{2}$$ So we get $$\mathcal{C}=\{(x,y,z)\in\mathbb{R}^3:x^2+y^2-z^2=0\}$$ Now while we initially only wanted the upward part of the cone, we can see that rewriting this as $$z^2=\pm\sqrt{x^2+y^2}$$ Means that our equation gives the lower part of the cone as well. So as long as our plane isn't vertical, i.e $c=0$, the system of equations $$\begin{bmatrix} ax+by+cz\\ x^{2} +y^{2} -z^{2} \end{bmatrix} =\begin{bmatrix} d\\ 0 \end{bmatrix}$$ Which will always have at least one solution.

2: Plane coordinates

Our goal here is to create a new "basis" (this is technically an abuse of terminology) for $\mathbb{R}^3$ that we can write a vector as an affine transformation $$x\hat{\mathrm{i}}+y\hat{\mathrm{j}}+z\hat{\mathrm{k}}=(x'\hat{\mathrm{i}}'+y'\hat{\mathrm{j}}'+z'\hat{\mathrm{k}}')+\mathrm{p}$$ Where $\mathrm{p}$ is some reference point on the plane, and the primed and unprimed basis vectors are related through via a linear transformation $$\mathbf{M}\begin{bmatrix} \hat{\mathrm{i}}\\ \hat{\mathrm{j}}\\ \hat{\mathrm{k}} \end{bmatrix} =\begin{bmatrix} \hat{\mathrm{i}}'\\ \hat{\mathrm{j}}'\\ \hat{\mathrm{k}}' \end{bmatrix}$$ The inverse transformation between coordinate systems is $$\begin{bmatrix} x\\ y\\ z \end{bmatrix}=\mathbf{M}^{-1}\begin{bmatrix} x'\\ y'\\ z' \end{bmatrix}+\mathrm{p}$$ We can multiply both sides by $\mathbf{M}$ to get the forward transformation: $$\mathbf{M}\left(\begin{bmatrix} x\\ y\\ z \end{bmatrix}-\mathrm{p}\right)=\begin{bmatrix} x'\\ y'\\ z' \end{bmatrix}$$ First, we find the point $\mathrm{p}$. Though any point will do, it makes sense to use the one closest to the origin (of our original coordinate system). It turns out that this point is $$\mathrm{p}=\frac{d}{a^2+b^2+c^2}(a,b,c)$$ This can be obtained either with simple coordinate geometry or, as I did it, with Lagrange multipliers. I can elaborate on how I did this if you wish. We let our third new basis vector be a unit vector parallel to this vector, that is $$\hat{\mathrm{k}}'=\frac{(a,b,c)}{\sqrt{a^2+b^2+c^2}}$$ We want our new basis to be orthonormal, that is we want the other two basis vectors to satisfy the equations $$\hat{\mathrm{i}}'\boldsymbol{\cdotp}\hat{\mathrm{k}}'=\hat{\mathrm{j}}'\boldsymbol{\cdotp}\hat{\mathrm{k}}'=\hat{\mathrm{i}}'\boldsymbol{\cdotp}\hat{\mathrm{j}}'=0$$

3: Finding the precise transformation matrix between the unit vectors

As of now, we have three equations for six (three components for both i and j) unknowns, so we need three extra conditions so we can uniquely determine our coordinate system. We'll only impose two extra conditions, namely $i'_1=j'_2$ and $j'_1=i'_2$. Letting $i'_1=1$ for now (this will be normalized later) we get the solutions $$\hat{\mathrm{i}}'\propto \left(1,\frac{-a^2-b^2-2c^2+\sqrt{(a^2+b^2+2c^2)^2-4a^2b^2}}{2ab},\frac{-a^2+b^2+2c^2-\sqrt{(a^2+b^2+2c^2)^2-4a^2b^2}}{2ac}\right)$$ $$\hat{\mathrm{j}}'\propto \left(\frac{-a^2-b^2-2c^2+\sqrt{(a^2+b^2+2c^2)^2-4a^2b^2}}{2ab},1,\frac{a^2-b^2+2c^2+\sqrt{(a^2+b^2+2c^2)^2-4a^2b^2}}{2bc}\right)$$ For first one I'll use the abbreviations $\mu,\nu_1$ (in that order) and for the second one I'll use the abbreviations $\mu,\nu_2$ in that order. I'll also let $\kappa_1=\sqrt{1+\mu^2+\nu_1^2}$ and $\kappa_2=\sqrt{1+\mu^2+\nu_2^2}$ so we can normalize the above two expressions and write $$\hat{\mathrm{i}}'=\frac{1}{\kappa_1}(1,\mu,\nu_1)~~;~~\hat{\mathrm{j}}'=\frac{1}{\kappa_2}(\mu,1,\nu_2)$$ The gammas can be found exactly in terms of $a,b,c$, but the expressions are rather lengthy so I won't bother posting them here. In practice you would do this numerically, not symbolically, anyway. Regardless, from the above expressions it's clear that $$\hat{\mathrm{i}}'=\frac{1}{\kappa_1}(\hat{\mathrm{i}}+\mu\hat{\mathrm{j}}+\nu_1\hat{\mathrm{k}})~~;~~\hat{\mathrm{j}}'=\frac{1}{\kappa_2}(\mu\hat{\mathrm{i}}+\hat{\mathrm{j}}+\nu_2\hat{\mathrm{k}})$$ And of course $$\hat{\mathrm{k}}'=\frac{a}{\sqrt{a^2+b^2+c^2}}\hat{\mathrm{i}}+\frac{b}{\sqrt{a^2+b^2+c^2}}\hat{\mathrm{j}}+\frac{c}{\sqrt{a^2+b^2+c^2}}\hat{\mathrm{k}}$$ Hence we can write the inverse transformation as $$\begin{bmatrix} \hat{\mathrm{i}}'\\ \hat{\mathrm{j}}'\\ \hat{\mathrm{k}}' \end{bmatrix} =\underbrace{\begin{bmatrix} \frac{1}{\kappa _{1}} & \frac{\mu }{\kappa _{1}} & \frac{\nu _{1}}{\kappa _{1}}\\ \frac{\mu }{\kappa _{2}} & \frac{1}{\kappa _{2}} & \frac{\nu _{2}}{\kappa _{2}}\\ \frac{a}{\sqrt{a^{2} +b^{2} +c^{2}}} & \frac{b}{\sqrt{a^{2} +b^{2} +c^{2}}} & \frac{c}{\sqrt{a^{2} +b^{2} +c^{2}}} \end{bmatrix}}_{\mathbf{M}}\begin{bmatrix} \hat{\mathrm{i}}\\ \hat{\mathrm{j}}\\ \hat{\mathrm{k}} \end{bmatrix}$$ We can, of course, invert this matrix to get the forward transformation, but the expressions become extremely long, so I'll once again omit them. Recalling the inverse transformation, points $(x,y,z)$ sitting on the plane will have a zero $z'$ coordinate, precisely, they will be expressible as $$\begin{bmatrix} x\\ y\\ z \end{bmatrix}=\mathbf{M}^{-1}\begin{bmatrix} x'\\ y'\\ 0 \end{bmatrix}+\mathrm{p}$$

4: Equation of the conic section

Recalling that the equation of the cone is $x^2+y^2-z^2=0$, we can plug in the RHS from the previous section into the equation for the cone to get the intersection surface between our plane and cone. We can represent our conic section as the quadric plane curve in our plane $\mathcal{P}$ using our primed plane coordinates $$\begin{array}{l} f(x',y')=\\ +\left( (\mathbf{M}^{-1} )_{1,1} \ x'+(\mathbf{M}^{-1} )_{1,2} \ y'+\frac{da}{a^{2} +b^{2} +c^{2}}\right)^{2}\\ +\left( (\mathbf{M}^{-1} )_{2,1} \ x'+(\mathbf{M}^{-1} )_{2,2} \ y'+\frac{db}{a^{2} +b^{2} +c^{2}}\right)^{2}\\ -\left( (\mathbf{M}^{-1} )_{3,1} \ x'+(\mathbf{M}^{-1} )_{3,2} \ y'+\frac{dc}{a^{2} +b^{2} +c^{2}}\right)^{2}\\ =0 \end{array}$$ So it seems computing the third row of the inverse matrix is actually not needed. However, numeric matrix inversion is very fast in software such as Mathematica, so I won't worry about it too much.

5: Reorienting our coordinate system

Let's drop the primes to make life easier for ourselves. We need to convert the above expression for $f$ into something of the form $$f(x,y)=A{x}^2+Bxy+C{y}^2+D=0$$ Which will be more useful for further analysis. We can avoid a pile of algebra (useful for numerical calculations) by simply noting $$\begin{array}{l} D=f( 0,0)\\ A=f( 1,0) -D\\ C=f( 0,1) -D\\ B=f( 1,1) -( A+C+D) \end{array}$$ Recall the standard (no tilting) equation for a conic is $$ux^2+vy^2-1=0$$ So the goal here is to find some change of coordinates $(x,y)\to(X,Y)$ that will eliminate the mixed $XY$ terms. We want to find some polynomial function $F$ such that $$f(x,y)=F(X,Y)\propto u X^2+vY^2-1$$ It turns out that a linear, not just affine, transformation will do - we don't need to move the origin. And we don't need to stretch the coordinate grid either, since our plane coordinates are already orthonormal. So we can simply use a rotation. So we are looking for a transformation of the form $$\begin{bmatrix} X\\ Y \end{bmatrix} =\begin{bmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{bmatrix}\begin{bmatrix} x\\ y \end{bmatrix}$$ The inverse transformation is of course $$\begin{bmatrix} x\\ y \end{bmatrix} =\begin{bmatrix} \cos \theta & \sin \theta \\ -\sin \theta & \cos \theta \end{bmatrix}\begin{bmatrix} X\\ Y \end{bmatrix}$$ Which means that $$\begin{array}{l} F(X,Y)=\\ A( X\cos \theta +Y\sin \theta )^{2}\\ +B( X\cos \theta +Y\sin \theta )( -X\sin \theta +Y\cos \theta )\\ +C( -X\sin \theta +Y\cos \theta )^{2}\\ +D \end{array}$$ So we expand out and set the mixed term equal to zero: $$\text{mixed coefficient}=2A\cos\theta\sin\theta+B(\cos^2\theta-\sin^2\theta)-2C\sin\theta\cos\theta=0$$ Using some double angle identities we get $$(A-C)\sin(2\theta)+B\cos(2\theta)=0$$ Obviously if $B=0$ this whole process is unnecessary and our original coordinates are already correctly aligned. Apart from that however, we break the solution of this equation into two cases.

Case 1 - $A=C$

When $A=C$, our equation reduces to
$$B\cos(2\theta)=0$$ So our first solution is $\theta=\pi/4$. Now since $\sin(\pi/4)=\cos(\pi/4)$ we can factor them out from our expression for $F$: $$F(X,Y)=\frac{1}{2}\left(C(X+Y)^2+B(Y+X)(Y-X)+C(X-Y)^2+2D\right)$$ Doing some algebra, we get $$F(X,Y)=\left(C-\frac{B}{2}\right)X^2+\left(C+\frac{B}{2}\right)Y^2+D$$ So $$F(X,Y)=-D\left(\underbrace{\frac{B-2C}{2D}}_{\equiv u}X^2+\underbrace{\frac{-B-2C}{2D}}_{\equiv v}Y^2-1\right)$$ If either $u=0$ or $v=0$ then we have a parabola. If not, then if the signs of $u$ and $v$ are different, we have a hyperbola. If both are nonzero and the same sign, then we have an ellipse or circle, and $$"b"=\text{semi minor axis}=\beta=\sqrt{\frac{1}{\min(|u|,|v|)}}$$ $$"a"=\text{semi major axis}=\alpha=\sqrt{\frac{1}{\max(|u|,v|)}}$$ Meaning if $|u|>|v|$ our conic can be written in the form $$\pm \frac{x^2}{\alpha^2}\pm \frac{y^2}{\beta^2}=1$$ Which perhaps is more familiar. The alpha and beta go in opposite places if $|u|<|v|$.

Case 2: $A\neq C$

In this case the equation for $\theta$ is not as simple. Recall that we want $$(A-C)\sin(2\theta)+B\cos(2\theta)=0$$ We can restate this as $$\tan(2\theta)=\frac{B}{C-A}$$ So $$\theta=\frac{1}{2}\arctan\left(\frac{B}{C-A}\right)$$ Our mixed term is zero, by construction. The other coefficients are $$X\text{ squared coefficient}=A\cos^2\theta-B\cos\theta\sin\theta+C\sin^2\theta$$ $$Y\text{ squared coefficient}=C\cos^2\theta+B\cos\theta\sin\theta+A\sin^2\theta$$ So then $$u=\frac{A\cos^2\theta-B\cos\theta\sin\theta+C\sin^2\theta}{-D}$$ And $$v=\frac{C\cos^2\theta+B\cos\theta\sin\theta+A\sin^2\theta}{-D}$$ Once again if either is zero, then the figure we have is a parabola. If the signs are different, we have a hyperbola. If both are nonzero with the same sign, we have an ellipse or hyperbola, and the same equations hold: $$"b"=\text{semi minor axis}=\beta=\sqrt{\frac{1}{\min(|u|,|v|)}}$$ $$"a"=\text{semi major axis}=\alpha=\sqrt{\frac{1}{\max(|u|,|v|)}}$$

In response to comments - some examples with plots

Shown below is a graphic of the intersection between the plane $ax+by+cz=d$ with the cone $x^2+y^2-z^2=0$, using $a=0.7,b=4.1,c=1,d=-3.3$: enter image description here

And now the plot of the conic of intersection $Ax^2+Bxy+Cy^2+D=0$, which we achieved through "plane coordinates" - in this case the coefficients are $A=0.934531,B=-0.291272,C=-1.57866,D=0.530046$: enter image description here

Finally, we rotate our coordinate system by an amount $\theta=0.0576914$ to get the conic in the form $ux^2+vy^2-1=0$, in this case $u=-1.71572,v=2.99421$. The signs are different, hence we have a hyperbola - enter image description here This is just a rotated version of the previous plot.

A quick recap

We started with the equations for the plane and the cone, $ax+by+cz=d$ and $x^2+y^2-z^2=0$. Now we have an equation for their intersection, which I have as $$ux^2+vy^2-1=0$$ Which perhaps you're more used to seeing as $$\pm\frac{x^2}{"a"^2}\pm\frac{y^2}{"b"^2}=1$$ The quotation marks are because I used a and b earlier and I don't want to cause any confusion.

Slope and angle

Let's assume now that $u$ and $v$ have different signs, i.e, we have a hyperbola. How can we find the equations of the asymptotes and the angle between them? First, the equations. We can solve the equation for $y$ to get $$y=\pm\sqrt{\frac{1-ux^2}{v}}$$ Which, since $u$ and $v$ are opposite signs, is $$y=\pm\sqrt{\frac{1}{v}+\frac{|u|}{|v|}x^2}$$ So for large $x$, the asymptotes are the lines $$y=\pm\sqrt{\frac{|u|}{|v|}}x$$ The line with the positive slope makes an angle of $\arctan(\sqrt{|u|/|v|})$ with the positive $x$ axis whereas the other makes an angle of $\pi-\arctan(\sqrt{|u|/|v|})$ with the positive $x$ axis meaning that the angle between them is $\phi_1=\pi-2\arctan(\sqrt{|u|/|v|})$. The other angle between them is $\phi_2=\frac{2\pi-2\phi_1}{2}$.

K.defaoite
  • 12,536
  • This answer is incomplete as it stands, but I might get back to it sometime later. Hopefully this is a good start for now. – K.defaoite Jan 04 '21 at 02:45
  • K. I appreciate all the energy you put into this explanation. Please refer to Wikipedia on Conic Sections. Q1 - is "a" always half way? Or if the plane is sloped, what is solution to "a"? Q2: How to determine "b"? Q3: How do I determine the angle of the asymptotes if the plane is sloped? – WoodGuy Jan 04 '21 at 06:56
  • Sorry. Comments are limited to 230 characters so I had to abbreviate my response. – WoodGuy Jan 04 '21 at 06:58
  • @Woodguy Yes, indeed more work needs to be done to get to "a" and "b" and the angle between the hyperbola asymptotes. I have to go to work today, but I will update the answer with that info when I am finished. – K.defaoite Jan 04 '21 at 13:36
  • K. Your impressive and elaborate solution seems to be created by a quite talented mathematical mind, and presented in an extraordinarily professional manner, almost as if it should be published in a graduate level text of some variety. The only problem I can possibly find with it is... I don't get it. You lost me somewhere around "affine". I'm sorry. I'm simpler than that. And so is the solution to the 3 questions that I've posted twice, now one... three times. How to find "a"? And I suspect it doesn't take all that. – WoodGuy Jan 07 '21 at 03:33
  • But it's a valiant effort. – WoodGuy Jan 07 '21 at 03:33
  • I mis-spoke. It's not a valiant effort. It's a beautiful solution if it's right. But I have no way to tell because I can't follow it. – WoodGuy Jan 07 '21 at 03:41
  • @WoodGuy I understand. My process is rather computationally heavy. There might be a simpler way to get to the result, but unfortunately this is the only one I could think of. Someone else mentioned Dandelin spheres, but this is something I know nothing about. The $a$ and $b$ are the $u$ and $v$ I have in my answer - sorry, I did not want to use the same symbol for two different things. – K.defaoite Jan 07 '21 at 03:53
  • Basically what I'm doing is getting the equation of the intersection between the plane and the cone using a coordinate system based on the plane, and then rotating that coordinate system so that our conic is aligned along the axes. Then, its "a" and "b" ($u,v$ in my answer) are much easier to extract. I can show you some examples with plots if you wish. – K.defaoite Jan 07 '21 at 03:54
  • If the plane is sloped, relative to the longitudinal axis of the cone, is "a" half the distance between the two vertices of the hyperbola as it is said to be in the Wikipedia article on Conic Sections? – WoodGuy Jan 07 '21 at 12:23
  • As I understand the Dandelin sphere, the concept gives an easy way to locate the distance from the vertex of the hyperbola to the focal point, which I have done. This distance is the difference between "a" and "c" in the Wiki article. I have resolved that distance, but it still does not provide all the information needed to resolve x²/a² - y²/b² = 1, without knowing either "a" or "b". However, if the slope of the asymptotes could be calculated, then with this, the relationship of "a" to "b" would be known, and the solution accomplished. – WoodGuy Jan 07 '21 at 12:31
  • some examples with plots would be greatly appreciated. – WoodGuy Jan 07 '21 at 12:37
  • @WoodGuy Sorry that I wasn't clear what "a" and "b" are. They are labeled in the answer. They are the min/max square root things I had. I will also add an edit to show how you can get the angle between the asymptotes of the hyperbola. – K.defaoite Jan 07 '21 at 16:18
0

I did not see a diagram for the Dandelin Spheres with a hyperbola, so I drew one. This page has a hyperbola

This is a side view, a cross section. Each circle means a sphere, both spheres are tangent to the cone, which is shown by the two black lines. The red/purple line is (two generating lines of) the cone.

enter image description here

Will Jagy
  • 139,541
  • 1
    Thanks Will. This provides the info to locate the focal point and gives me something to study further. Appreciate it. – WoodGuy Jan 02 '21 at 20:56