Re:Analog Chess – pieces are not constrained to a grid
by ehulinsky on Saturday January 14, 2023 @02:20AM
(#34378050)
The problem is that it needs to check every position that the king can move to as well. Doing it based on pixels would be extremely slow, and doing it based on the math seems like a nightmare, unless I am missing something.
Re:Analog Chess – pieces are not constrained to a grid
by kortex on Sunday January 15, 2023 @01:31AM
(#34387230)
You would not do it by pixels, it's pure math. I'd have to sit down and work through the actual math, but between convolution and affine transformations, I'm pretty sure there should be a way to compute the intersection with a formula for each piece type.
Knight is the easiest, that's just checking (lol) the distance to see if 5-r/2 <= d < 5+r/2.
* again, straightforward if you have experience with computer rendering, CV, or similar domains, but less so in other domains.