Background
Overlapping windows disagree with each other since each one was generated separately. Weighting a window so it counts for most in its own centre and fades out toward its edges is what makes the handover gradual instead of a visible line.
Description
Create a function that returns a grid of weights the size of a patch, since the weights get applied to what is added into the region grids.
Weights should be largest in the middle and get smaller toward the edges. Every weight must be greater than zero. A weight of exactly zero means a cell in the corner of a region, covered by only one window, can never be filled in.
The same grid is used for every window so it only needs to be worked out once.
Testing:
- Assert the grid is the size of a patch
- Assert it reads the same forwards and backwards in both directions
- Assert the largest value is in the middle
- Assert values at the edges are smaller than values in the middle
- Assert every value is greater than zero
Background
Overlapping windows disagree with each other since each one was generated separately. Weighting a window so it counts for most in its own centre and fades out toward its edges is what makes the handover gradual instead of a visible line.
Description
Create a function that returns a grid of weights the size of a patch, since the weights get applied to what is added into the region grids.
Weights should be largest in the middle and get smaller toward the edges. Every weight must be greater than zero. A weight of exactly zero means a cell in the corner of a region, covered by only one window, can never be filled in.
The same grid is used for every window so it only needs to be worked out once.
Testing: