PROJECT EULER · #0392
Enmeshed Unit Circle
A rectilinear grid is an orthogonal grid where the spacing between the gridlines does not have to be equidistant.
An example of such grid is logarithmic graph paper.
Consider rectilinear grids in the Cartesian coordinate system with the following properties:
- The gridlines are parallel to the axes of the Cartesian coordinate system.
- There are
vertical and horizontal gridlines. Hence there are rectangular cells. - The equations of the two outer vertical gridlines are
and . - The equations of the two outer horizontal gridlines are
and . - The grid cells are colored red if they overlap with the unit circleThe unit circle is the circle that has radius
and is centered at the origin, black otherwise.
E.g. here is a picture of the solution for

Find the positions for
Give as your answer the area occupied by the red cells rounded to
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.