fix comment in math.scad

This commit is contained in:
Adrian Mariano 2023-07-25 16:27:47 -04:00
parent cb1e14f6d4
commit 262ad3e20b
2 changed files with 9 additions and 8 deletions

View file

@ -109,7 +109,7 @@ function _inherit_gear_thickness(thickness) =
// zrot(87-360/30)stroke([[pitchpt,0],[pitchpt+11,0]], width=0.25); // zrot(87-360/30)stroke([[pitchpt,0],[pitchpt+11,0]], width=0.25);
// right(8.3)back(74)zrot(87-360/30)zrot(10,cp=[pitchpt,0]) stroke( arc(angle=[0,20],r=10.5),endcaps="arrow2",width=.25); // right(8.3)back(74)zrot(87-360/30)zrot(10,cp=[pitchpt,0]) stroke( arc(angle=[0,20],r=10.5),endcaps="arrow2",width=.25);
// back(84)right(13)text("pressure angle",size=2.5); // back(84)right(13)text("pressure angle",size=2.5);
// } // }
// Continues: // Continues:
// The size of the teeth can be specified as the circular pitch, the distance along the pitch circle // The size of the teeth can be specified as the circular pitch, the distance along the pitch circle
// from the start of one tooth to the start of the text tooth. The circular pitch can be computed as // from the start of one tooth to the start of the text tooth. The circular pitch can be computed as

View file

@ -1560,13 +1560,6 @@ function _poly_roots(p, pderiv, s, z, tol, i=0) =
// eps = used to determine whether imaginary parts of roots are zero // eps = used to determine whether imaginary parts of roots are zero
// tol = tolerance for the complex polynomial root finder // tol = tolerance for the complex polynomial root finder
// The algorithm is based on Brent's method and is a combination of
// bisection and inverse quadratic approximation, where bisection occurs
// at every step, with refinement using inverse quadratic approximation
// only when that approximation gives a good result. The detail
// of how to decide when to use the quadratic came from an article
// by Crenshaw on "The World's Best Root Finder".
// https://www.embedded.com/worlds-best-root-finder/
function real_roots(p,eps=undef,tol=1e-14) = function real_roots(p,eps=undef,tol=1e-14) =
assert( is_vector(p), "Invalid polynomial." ) assert( is_vector(p), "Invalid polynomial." )
let( p = _poly_trim(p,eps=0) ) let( p = _poly_trim(p,eps=0) )
@ -1602,6 +1595,14 @@ function real_roots(p,eps=undef,tol=1e-14) =
// x0 = endpoint of interval to search for root // x0 = endpoint of interval to search for root
// x1 = second endpoint of interval to search for root // x1 = second endpoint of interval to search for root
// tol = tolerance for solution. Default: 1e-15 // tol = tolerance for solution. Default: 1e-15
// The algorithm is based on Brent's method and is a combination of
// bisection and inverse quadratic approximation, where bisection occurs
// at every step, with refinement using inverse quadratic approximation
// only when that approximation gives a good result. The detail
// of how to decide when to use the quadratic came from an article
// by Crenshaw on "The World's Best Root Finder".
// https://www.embedded.com/worlds-best-root-finder/
function root_find(f,x0,x1,tol=1e-15) = function root_find(f,x0,x1,tol=1e-15) =
let( let(
y0 = f(x0), y0 = f(x0),