I would like to fit a hyperboloid to a set radii, but I must be making some mistake in solving for my derived constants. The question is technically only two-dimensional in nature, but I'm using a series of two-dimensional calculations to derive a three-dimensional hyperboloid structure over time.
For my needs, I can think of a hyperboloid as a stack of circles, each with a radius matching a point on a hyperbola. The general cartesian equation for a hyperbola is:
$$\frac{x^2}{a^2}-\frac{y^2}{b^2}=1$$
In this case, I can solve for $x$ and treat it as the radius $r$ and $y$ is related to the height hyperboloid. Solving for $r$ leads to:
$$r(y)=\sqrt{ay^2+b}$$
I've just inserted new arbitrary constants $a$ and $b$ to start from in my function. Now, what I want to do is to fit this hyperbola to a set of 3 radii and a given height separating the top from the bottom. The top (at $y_t$) is separated from the bottom (at $y_b$) by height $h$. I want to fit the hyperbola to the radius of the top $t$, the radius of the bottom $b$, and the radius of the waist $w$ (at $y_w=0$).
In summary, that gives us the following facts from which to work:
- Radius $w=r(y_w)=r(0)=\sqrt{b}$ is the radius of the narrow waist of the hyperboloid.
- Radius $t=r(y_t)$ is the radius of the top of the hyperboloid such that $t>w$.
- Radius $b=r(y_b)$ is the radius of the bottom of the hyperboloid such that $b>w$.
- $y_t>y_w>y_b$. Also $y_t>0>y_b$.
- $w=r(y_w)=r(0)=\sqrt{b}$.
- The height $h=y_t-y_b$.
- The values $w$, $t$, $b$, $y_w$, and $h$ are known.
- $a>0$.
I need to solve for $y_t$, $y_b$, and $a$ to complete the formula and determine the range over which we need to evaluate $r(y)$ to create the desired hyperboloid. I would be grateful if someone could help me derive the solution.
After some further thought on the problem, I found my solution. I share it here for posterity. My initial attempts failed for a couple reasons. One, I was trying too late at night and operating below nominal mental capacity and, two, I failed to take into account the fact that a solution involving a square may have two solutions (±).
We can derive a solution thusly, using the names shown above, with one change. I realized, I'd used $b$ twice, once as a constant in the $r(y)$ function and the other as a result of the $r(y)$ function. Because the constant in the $r(y)$ function is easily determine and to avoid confusion I'm going to rewrite the function $r(y)$ as and drop any reference to that value:
$$r(y)=\sqrt{ay^2+w^2}$$
We really need to resolve $a$, but $a$ is going to be defined in terms of three points on the hyperbola $(w, 0)$, $(b, y_b)$, and $(t, y_t)$. We don't know the values for $y_b$ or $y_t$. We can get them in terms of $m$ or we can get $m$ in terms of either of them, but that's not enough information to solve for any of these three values on their own.
However, we can bridge that gap using $h$. First we solve for $y_b$ by plugging the point into the function:
$$b=\sqrt{my_b^2+w^2}$$
solving for $y_b$ yields:
$$y_b=-\sqrt{\frac{b^2-w^2}{m}}$$
We know we want a negative $y_b$, so we will ignore the positive possible value.
Similarly, solving for $y_t$ gets us:
$$y_t=\sqrt{\frac{t^2-w^2}{m}}$$
Again, we know we want a positive $y_t$, so we will only worry about the positive possible value here.
We know these are related by $h$ like this:
$$h=y_t-y_b$$
If we plug our solution in we get:
$$h=\sqrt{\frac{t^2-w^2}{m}}+\sqrt{\frac{b^2-w^2}{m}}$$
We know we want $y_t$ to be positive and $y_b$ to be negative. We can then solve for m to give us:
$$m=\frac{(\sqrt{t^2-w^2}+\sqrt{b^2-w^2})^2}{h^2}$$
With that, we have a final solution of:
$$r(y)=\sqrt{\frac{(\sqrt{t^2-w^2}+\sqrt{b^2-w^2})^2}{h^2}y^2+w^2}$$