I have a question about how to join the rectangles so that they become another shape?
I have created rectangle/2 facts such as:
rectangle(1.14, 2.14). %rectangle(Length, Width).
rectangle(1.36, 3.34).
rectangle(0.20, 2.35).
rectangle(1.00, 1.30).
But, are these facts correct anyway?
Here is the image I want to create and this is the image detailing how the rectangles are combined.
The rectangles should joined using the selected edge.
Two numbers do not constitute a rectangle because a rectangle has 4 points.
Start by trying to build clauses with 4 arguments like this:
Then you may query the points as such:
So you’d need to infer the actual rectangles from the points given, or you need the assert the rectacle/4 predicates when building your code.