joostn / OpenJsCad

3D solid CAD using only Javascript
315 stars 128 forks source link

Update gears.jscad #93

Closed LunsTee closed 3 years ago

LunsTee commented 3 years ago

Existing code picks points on involute curve with uniform angle steps. This gives small steps on the curve close to the base circle, and larger steps away, with larger steps deviating more from the involute curve.

Deviation goes with angle*(angle step)^2. Taking the angle proportional to (i/resolution)^2/3 keeps deviation uniform, making the most out of the steps available.

joostn commented 3 years ago

Thank you!