You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For working with Boxes / Rectangles, it might make sense to have concepts splitting a rectangle into 2, 4, or 9 subrectangles, and having concepts such as West/East, North/South, NorthWest, NorthEast, SouthWest, SouthEast, Center.
The text was updated successfully, but these errors were encountered:
data DisjointDirection = West | East | ...
data Intersection = Contained | Contains
data Direction = DisjointDirection DisjointDirection
| Intersection Intersection
rectangleRelation :: Rectangle -> Rectangle -> Direction
I'm all for adding more functions for working with boxes and rectangles. For splitting a rectangle I guess we could implement something with type : Rectangle p r -> Matrix n m (Rectangle (Maybe p) r) or so. For boxes ideally you would have an higher dimensional equivalant of that.
By West/East/North/South etc you mean regions the regions in the plane that you get by considering the supporting lines of the edges I guess? That seems reasonable.
I'm not sure what rectangleRelation from your second post is supposed to model exactly? I.e. what should the rectangle relation between a unit square from (0,0) to (1,1) and a rectangle (2,-10),(3,10) be? what if the upper coordinate is (3,100000000) ?
For working with Boxes / Rectangles, it might make sense to have concepts splitting a rectangle into 2, 4, or 9 subrectangles, and having concepts such as West/East, North/South, NorthWest, NorthEast, SouthWest, SouthEast, Center.
The text was updated successfully, but these errors were encountered: