# How do I find the intersection of these two parametric curves (representing an undercut involute gear's tooth faces and tooth roots)?

I have two parametric curves. The first, with parameter theta:

$x = Z × \cos(?) × (\cos(? ? \tan(?) + ?) + ? × \sin(? ? \tan(?) + ?)),$
$y = Z × \cos(?) × (\sin(? ? \tan(?) + ?) ? ? × \cos(? ? \tan(?) + ?)),$
$?_{min} ? ? ? ?_{max}$

And the second, with parameter gamma:

$x = (2 × X ? 2 × C + Z) × \cos(?) + (2 × \tan(?) × (C ? X) + ? × Z) × \sin(?),$
$y = (2 × X ? 2 × C + Z) × \sin(?) ? (2 × \tan(?) × (C ? X) + ? × Z) × \cos(?),$
$?_{min} ? ? ? ?_{max}$

Where:

• $Z$ is a positive integer,
• $?$ is an angle in the interval $[0°, 32°]$,
• $X$ is a real number in the interval $[?1, 1]$,
• $C$ is a real number in the interval to $[1, 1.5]$,
• $?_{max} = \frac{\sec(?)}{Z} × \sqrt{(2 × X + Z + 2)² ? Z² × \cos(?)²}$,
• $?_{max} = \frac{?2}{Z} × (C ? X) × \tan(?)$, and
• $?_{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 $? = \tan(?) ? \frac{4}{Z} × (C ? X) × \csc(2 × ?)$ and $? = \frac{?4}{Z} × (C ? X) × \csc(2 × ?)$. (See the red and blue curves in https://i.stack.imgur.com/MbIkv.png)

However, when $? < \arcsin\left(\sqrt{\frac{2}{Z} × (C ? X)}\right)$, there is a transversal intersection (where their tangents are distinct) at parameter values closer to zero than for the touching intersection. (See the red and blue curves in https://i.stack.imgur.com/5fM6k.png)

I want to find the parameter values $?_{min}$ and $?_{min}$ for this transversal intersection in terms of $Z$, $?$, $X$, and $C$.

Specifically, $?_{min}$ should always be greater than or equal to zero. If $? < \arcsin\left(\sqrt{\frac{2}{Z} × (C ? X)}\right)$, then the value of $? = \tan(?) ? 4 / Z × (C ? X) × \csc(2 × ?)$ is negative and thus is invalid for my purposes.

I know that on the first curve, the radius of a point for a given value of theta is $r_? = Z \cos(?) \sqrt{?² + 1}$, and conversely the value of theta for a given radius is $?_r = \sqrt{\frac{r²} {Z² \cos(?)²} - 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.

Similarly, I know that for the second curve, the radius of a point for a given value of gamma is $r_? = \sqrt{(2 \tan(?) (C - X) + ? Z)² + (2 X - 2 C + Z)²}$, and conversely the value of gamma for a given radius is $?_r = \frac{±\sqrt{r² - (2 X - 2 C + Z)²} + (2 X - 2 C) \tan(?)}{Z}$. 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.

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.

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 trochoid 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 four parameters:
• $Z$, the number of teeth on the gear;
• $?$, the angle of the contact force between meshed gear teeth, called the pressure angle or pitch angle;
• $X$, the profile shift coefficient, specifying how far in or out the cutting tool is moved compared to cutting a standard gear profile; and
• $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.
There is an additional gear design parameter, called module or pitch, which describes the overall size of the gear. Because this parameter is a uniform scaling factor, it has no effect on the angles involved or the values of theta and gamma, so I have left it out of the equations for the sake of simplicity.

When $? ? \arcsin\left(\sqrt{\frac{2}{Z} × (C ? X)}\right)$, the involute face curve transitions smoothly into the trochoid root curve (with a touching intersection). However, when $? < \arcsin\left(\sqrt{\frac{2}{Z} × (C ? X)}\right)$, 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.
• It would take over an hour to understand, and figure out a solution for this problem. So I would say your offered amount is too low.

• @David89 I increased the bounty.