1

First, some context:

I am working on software that will allow users to define wafers full of dies (as defined here: How many squares fit in a circle) to match a physical wafer. I don't need to calculate the maximum number of rectangles that will fit within the circle, because the program is designed to utilize a series of user entered parameters. Namely, the user will enter the radius of the circle, the length and width of the rectangles, and a grid offset.

With an offset of 0 in each direction (x and y), the grid will be aligned within the circle so the border between two rectangles will run through the exact center of the circle in both directions.

Circle with no offset

Alternatively, with a non-zero offset in the x and/or y directions, the grid will have a different appearance, despite using the same radius, length, and width measurements.

Circle with an offset

Because the software has to exactly match a physical wafer, the user-entered offset defines the location of the grid within the circle. There is not a specific measurement that the user can enter to specify this offset, so the current solution is to manually adjust it semi-arbitrarily until it matches. However, this is not an ideal solution, and I would like to implement a way for the software to autocalculate this measurement, which brings me to my question.

The question:

Is there an algorithm that would allow a user to enter the number of valid rectangles (entirely contained within the circle) on each outer-most row/column and output a 2-dimensional offset? For example, in the first image, there are 8 valid rectangles along each edge when there was an offset of 0 in both the x and y directions. For the second image, I would like to be able to enter 7 for the top, 7 for the right, 5 for the bottom, 6 for the left, and have it output the offset that would be necessary for that layout.

MJD
  • 65,394
  • 39
  • 298
  • 580

0 Answers0