Background
I have two parametric curves, and I want to find the parameter values of their intersection point closest to zero under certain conditions.
The first curve is an involute of a circle with parameter theta:
$$ x_1(θ) = \frac{Z}{2} ⋅ \cos(α) ⋅ (\cos(θ − \tan(α) + α) + θ ⋅ \sin(θ − \tan(α) + α)), $$
$$ y_1(θ) = \frac{Z}{2} ⋅ \cos(α) ⋅ (\sin(θ − \tan(α) + α) − θ ⋅ \cos(θ − \tan(α) + α)), $$
$$ 0 ≤ θ_{min} ≤ θ ≤ θ_{max} $$
(note that theta must always be greater than or equal to zero)
And the second curve is a roulette with parameter gamma:
$$ \begin{align} x_2(γ) =& \left(1 - \frac{\operatorname{sgn}(P) ⋅ F}{\sqrt{P^2 + \left(γ ⋅ \frac{Z}{2}\right)^2}}\right) ⋅ \left(\operatorname{sgn}(P) ⋅ γ ⋅ \frac{Z}{2} ⋅ \sin(\operatorname{sgn}(P) ⋅ γ + Q) + P ⋅ \cos(\operatorname{sgn}(P) ⋅ γ + Q)\right) \\ +& \frac{Z}{2} ⋅ \cos(\operatorname{sgn}(P) ⋅ γ + Q) - (1 - \operatorname{sgn}(P)^2) ⋅ F ⋅ \cos(γ - Q), \end{align} $$
$$ \begin{align} y_2(γ) =& \left(1 - \frac{\operatorname{sgn}(P) ⋅ F}{\sqrt{P^2 + \left(γ ⋅ \frac{Z}{2}\right)^2}}\right) ⋅ \left(\operatorname{sgn}(P) ⋅ γ ⋅ \frac{Z}{2} ⋅ \cos(\operatorname{sgn}(P) ⋅ γ + Q) - P ⋅ \cos(\operatorname{sgn}(P) ⋅ γ + Q)\right) \\ -& \frac{Z}{2} ⋅ \sin(\operatorname{sgn}(P) ⋅ γ + Q) - (1 - \operatorname{sgn}(P)^2) ⋅ F ⋅ \sin(γ - Q), \end{align} $$
$$ γ_{min} ≤ γ ≤ 0 $$
where $P := X - C + F$ and $Q := \frac{F ⋅ \sec(α) - P ⋅ \tan(α)}{\frac{Z}{2}}$.
The equations for the two curves are built with five independent variables:
- $Z$ is a positive integer,
- $X$ is a real number in the closed interval $[−1, 1]$,
- $C$ is a real number in the closed interval $[1, 1.5]$,
- $F$ is a real number in both the closed intervals
- $\left[0, (\tan(α) + \sec(α)) ⋅ \left(\frac{π}{4} - C ⋅ \tan(α)\right)\right]$ and
- $\left[0, (\tan(α) + \sec(α)) ⋅ \sec(α) ⋅ (C - 1)\right]$, and
- $α$ is an angle in the closed interval $\left[0, \arctan\left(\frac{π}{4 ⋅ C}\right)\right]$.
The upper boundaries of the parameter values are
- $θ_{max} = \frac{\sqrt{\left(X + \frac{Z}{2} + 1\right)^2 - \left(\frac{Z}{2} ⋅ \cos(α)\right)^2}}{\frac{Z}{2} ⋅ \cos(α)}$ and
- $γ_{max} = 0$
$θ_{min}$ and $γ_{min}$ are the parameter values at the intersection that I want to find.
I know that the curves have a touching intersection (where their tangents are the same) at the parameter values
- $θ = \frac{P}{\frac{Z}{2} ⋅ \tan(α)} - Q + \tan(α)$ and
- $γ = (1 - \operatorname{sgn}(P)^2) ⋅ \left(α - \frac{π}{2}\right) - \frac{\operatorname{abs}(P)}{\frac{Z}{2} ⋅ \tan(α)}$
(See the red and blue curves in the following picture.)
However, when the values of the five variables are such that $\frac{P}{\frac{Z}{2} ⋅ \tan(α)} - Q + \tan(α) < 0$, two things happen:
- The value of $θ_{max}$ from the above definition becomes negative, which makes it invalid for my purposes, and
- A transversal intersection (where the curves' tangents are distinct) appears at values of gamma and theta closer to zero than those for the touching intersection, and specifically with a positive value of theta. (See the red and blue curves in the following picture.)
This transversal intersection does also exist when $\frac{P}{\frac{Z}{2} ⋅ \tan(α)} - Q + \tan(α) ≥ 0$, it's just at a negative (invalid) value of theta and is thus hidden.
The Problem
I want to find closed-form expressions for the parameter values $θ_{min}$ and $γ_{min}$ at this transversal intersection in terms of $α$, $Z$, $X$, $C$, and $F$, in the specific case where $\frac{P}{\frac{Z}{2} ⋅ \tan(α)} - Q + \tan(α) < 0$, given the stated domains of the independent variables $α$, $Z$, $X$, $C$, and $F$. Additionally, when that inequality is true, $θ_{min}$ should always be strictly greater than zero.
When that inequality is not true, the value of any new expression for $θ_{min}$ is irrelevant, because I already have expressions that work in that case, so it's fine if the new expression is undefined or negative when that inequality is not true.
Is it possible to find closed-form expressions here?
Where These Curves Come From
The curve with parameter theta is a portion of the envelope of the line described by the equation
$$ \ \ \ \ \sin(β + α) ⋅ x \\ - \cos(β + α) ⋅ y \\ = \frac{Z}{2} ⋅ (\sin(α) + β ⋅ \cos(α)) $$
as the parameter $β$ varies from $-∞$ to $+∞$. Specifically, it is the path of the point on that line with $(x, y)$ coordinates
$$ \begin{pmatrix}\begin{align} &\frac{Z}{2} ⋅ \cos(α) ⋅ (\cos(α + β) + \sin(α + β) ⋅ (\tan(α) + β)), \\ &\frac{Z}{2} ⋅ \cos(α) ⋅ (\sin(α + β) - \cos(α + β) ⋅ (\tan(α) + β)) \end{align}\end{pmatrix} $$
The curve with parameter gamma is the path of one of the intersection points of the line
$$ \ \ \ \ \left(\left(β ⋅ \frac{Z}{2} + Q\right) ⋅ \cos(β) - P ⋅ \sin(β)\right) ⋅ x \\ + \left(\left(β ⋅ \frac{Z}{2} + Q\right) ⋅ \sin(β) + P ⋅ \cos(β)\right) ⋅ y \\ = \frac{Z}{2} ⋅ \left(β ⋅ \frac{Z}{2} + Q\right) $$
with the circle
$$ \ \ \ \ \left(x - \left(\left(\frac{Z}{2} + P\right) ⋅ \cos(β) + \left(β ⋅ \frac{Z}{2} + Q\right) ⋅ \sin(β)\right)\right)^2 \\ + \left(y - \left(\left(\frac{Z}{2} + P\right) ⋅ \sin(β) - \left(β ⋅ \frac{Z}{2} + Q\right) ⋅ \cos(β)\right)\right)^2 \\ = F^2 $$
I've tried to find a way to relate the envelope of the first line, and its generating point, with the path of the second point. I've had no success so far, but I'm hopeful that a way to do so does exist.
What Else I Know
I do know that on the first curve, the radius of a point for a given value of theta is $r(θ) = \frac{Z}{2} ⋅ \cos(α) ⋅ \sqrt{θ^2 + 1}$, and conversely the value of theta for a given radius is $θ(r) = \sqrt{\left(\frac{2 ⋅ r} {Z ⋅ \cos(α)}\right)^2 − 1}$. This means that if I can find the radius of the transversal intersection point by any process, I can easily convert it into the value for $θ_{min}$, and vice versa. I also know that the angle made with the $x$-axis by a point on the curve at a given value of theta is $β(θ) = θ − \arctan(θ) + α − \tan(α)$, which is transcendental and has no closed-form inverse, so I cannot use a known angle to find the value of theta. The same goes for the second curve, just with much more complicated expressions.
Thus, if I get either one of $θ_{min}$ or $γ_{min}$, I can use that value to find the other. If I can find the radius of the intersection separately, I can use it to find both values. Given these expressions, I know that the radius of the touching intersection is $r = \sqrt{(F - P ⋅ \csc(α))^2 + Z ⋅ (P - F ⋅ \sin(α)) + \left(\frac{Z}{2}\right)^2}$. I've attempted to find a similar expression for the transversal intersection by working backwards from numerically-calculated values, without any success yet.
For example, by plotting the two curves in graphing software and numerically calculating the parameter values of their intersections to ten decimal places, I created this plot, which shows the $γ_{min}$ value against the pressure angle $α$ (including some technically-invalid negative values of $α$ to get a broader sample size) for four different values of $Z$, all with $X = 0$, $C = 1$, and $F = 0$:
The green lines show the known expression $γ_{min}(α)$, while the red points are samples of the unknown expression for which I am searching. I've been trying to fit a curve to the red points, unfortunately without any success yet.
As stated above, if I can find the equation that describes the red points and thus the value of $γ_{min}$, I can use that to also find the value of $θ_{min}$, which would completely solve my problem.
Similarly, I numerically calculated the $θ_{min}$ values for $1°$ increments of $α$ with $Z = 24$, $X = 0$, $C = 1.25$, and $F = 0$ and plotted the results. This shows that the unknown expression for $θ_{min}(α)$ is very close to half the known expression for $θ_{min}(α)$ reflected over the vertical line where $θ_{min}(α) = 0$:
To see what the difference is between that squashed reflection and the sampled points, I also plotted points where that curve is subtracted from the vertical coordinate, in red, and points where the vertical coordinate is divided by the height of that curve, in green:
These sets of points look very much like they should be described by combinations of trig functions, but I haven't been able to find combinations that fit them exactly.
I also figured out that the value of $γ_{min}$ seems to have an upper bound of $-\sqrt{\frac{T^2 - P^2}{\left(\frac{Z}{2}\right)^2}} - (1 - \operatorname{sgn}(P)^2) ⋅ \arccos\left(\frac{F^2 - \left(\frac{Z}{2}\right)^2 ⋅ (\cos(α)^2 - 1)}{2 ⋅ F ⋅ \frac{Z}{2}}\right)$, where
$$ T := \sqrt[3]{-\frac{F ⋅ B}{3} + \sqrt{\left(\frac{F ⋅ B}{3}\right)^2 + \left(P ⋅ Z - \frac{\left(\frac{2}{3} ⋅ F\right)^2 - B}{3}\right)^3}}\\ + \sqrt[3]{-\frac{F ⋅ B}{3} - \sqrt{\left(\frac{F ⋅ B}{3}\right)^2 + \left(P ⋅ Z - \frac{\left(\frac{2}{3} ⋅ F\right)^2 - B}{3}\right)^3}}\\ - \frac{2}{3} ⋅ F $$
and
$$ B := \frac{\left(\frac{F}{3}\right)^2 - \frac{Z}{2} ⋅ \left(\frac{Z}{2} ⋅ (A^2 - 1) + P\right)}{3} $$
but I haven't been able to refine that into an exact solution.
Context
The curve with parameter theta is the involute face curve of a tooth on an involute gear, while the curve with parameter gamma is the roulette root curve of the same tooth. These curves are naturally generated in real life by the gear-shaping process called hobbing, without needing any fancy math. Representing them in a computer, which I want to do, is more difficult.
The shapes of these curves are defined by five variables:
- $α$, the angle of the contact force between meshed gear teeth, called the pressure angle;
- $Z$, the number of teeth on the gear;
- $X$, the profile shift coefficient, specifying how far in or out the cutting tool is moved compared to cutting a standard gear profile;
- $C$, the clearance factor, specifying how much clearance there is between the tooth roots on one gear and the tooth tips on a meshing gear as a multiple of the overall tooth height (a value of 1 gives zero clearance, a value of 1.5 gives half a tooth-height of clearance); and
- $F$, the root fillet radius, specifying the radius of the fillet curve that joins the roots of the teeth to the faces of the teeth.
There is one more gear design variable, called module or pitch, which describes the overall size of the gear. Because this variable is a uniform scaling factor, it has no effect on the angles involved or on the values of theta and gamma, so I have left it out of the equations for the sake of simplicity.
When $\frac{P}{\frac{Z}{2} ⋅ \tan(α)} - Q + \tan(α) ≥ 0$, the involute face curve transitions smoothly into the roulette root curve (with a touching intersection). However, when $\frac{P}{\frac{Z}{2} ⋅ \tan(α)} - Q + \tan(α) < 0$, the root curve cuts off some of the face curve (with a transversal intersection). This is called undercutting and is in general undesirable, as it reduces the strength of the gear. However, small amounts of undercutting are tolerated in many situations. I want to find the point on each curve where this undercutting occurs so I can accurately draw an undercut gear in software.
This question is very similar to another question on this site, but that question's answer doesn't address my particular problem.