\\ Auxiliary function, assumes points on boundary are outside. \\ This is conservative for finding the maximum number of covered \\ grid points. Results for the minimum number must, at least in theory, \\ be checked to see if they depend on an exact location \\ of grid points on the boundary. inrot(x,y,w,h,sp,cp) = {my (xr=x*cp+y*sp, yr=-x*sp+y*cp); xr>0 && xr0 && yr cmax, if(verbose,print([n,dx,dy,phi])); cmax=n) ); [cmin, cmax] }; \\ Examples of calls \\ a354702_4(7,3) should return [18, 25] \\ for(n=1,10,print1(a354702_4(n,n,20000,0)[1],", ")) \\ provides upper bounds for A293330, but, be warned: \\ 20000 reps is far too few to get stable results.