Spiral Bevel gear design


Hello, I am a student in Mechanical Engineering and I am looking to make a so-called hypoidal pinion.
I want this pinion to be parametric, I have already done 90% of the work but I am stuck.
I am trying to find a curve that allows me to start from the top of the cone to a pitch circle where the tooth of my pinion is defined. This curve must have a BETA parameter that allows me to manage the inclination of the teeth.
The problem is that my curve goes too far, and I don't know how to limit the h factor in my equation, as you can see here ->
My curve must take into account the following parameters (I think):
Spiral angle (β): This is the angle of the spiral of the tooth.
Pressure angle (𝛼): This is the angle formed by the line of action with the transverse plane.
Base radius (𝑟𝑏): This is the radius at the base (primitive) of the cone where the teeth begin.
Module (𝑚): This is the measure that connects the distance between two consecutive teeth on the pitch circle.
Taper angle (𝛾): This is the angle that determines the variation of the pinion diameter
Making a helical bevel pinion is quite complex, that's why I'm asking for help to finish this project.

