|
|
80bc9b |
/*
|
|
|
80bc9b |
......... 2015 Ivan Mahonin
|
|
|
80bc9b |
|
|
|
80bc9b |
This program is free software: you can redistribute it and/or modify
|
|
|
80bc9b |
it under the terms of the GNU General Public License as published by
|
|
|
80bc9b |
the Free Software Foundation, either version 3 of the License, or
|
|
|
80bc9b |
(at your option) any later version.
|
|
|
80bc9b |
|
|
|
80bc9b |
This program is distributed in the hope that it will be useful,
|
|
|
80bc9b |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
80bc9b |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
80bc9b |
GNU General Public License for more details.
|
|
|
80bc9b |
|
|
|
80bc9b |
You should have received a copy of the GNU General Public License
|
|
|
80bc9b |
along with this program. If not, see <http: licenses="" www.gnu.org="">.</http:>
|
|
|
80bc9b |
*/
|
|
|
80bc9b |
|
|
|
7c6265 |
{
|
|
|
7c6265 |
name:
|
|
|
7c6265 |
(Two squares)
|
|
|
7c6265 |
a:
|
|
|
7c6265 |
( ( ((0, 0), (200, 0), (200, 200), (0, 200)) ) )
|
|
|
7c6265 |
b:
|
|
|
7c6265 |
((((100, 100), (300, 100), (300, 300), (100, 300))))
|
|
|
7c6265 |
add:
|
|
|
7c6265 |
((((0, 0), (200, 0), (200, 100), (300, 100), (300, 300), (100, 300), (100, 200), (0, 200))))
|
|
|
7c6265 |
subtract:
|
|
|
7c6265 |
((((0, 0), (200, 0), (200, 100), (100, 100), (100, 200), (0, 200))))
|
|
|
30455f |
intersection:
|
|
|
30455f |
((((100, 100), (200, 100), (200, 200), (100, 200))))
|
|
|
7c6265 |
xor:
|
|
|
05068e |
( (((0, 0), (200, 0), (200, 100), (100, 100), (100, 200), (0, 200))),
|
|
|
05068e |
(((200, 200), (200, 100), (300, 100), (300, 300), (100, 300), (100, 200))) )
|
|
|
7c6265 |
}
|
|
|
296d46 |
|
|
|
4470e0 |
{
|
|
|
4470e0 |
name:
|
|
|
4470e0 |
(Self touch)
|
|
|
4470e0 |
a:
|
|
|
4470e0 |
((( (100, 100), (200, 0), (400, 0), (400, 300), (0, 300), (0, 200),
|
|
|
4470e0 |
(100, 100), (100, 200), (200, 200), (200, 100) )))
|
|
|
4470e0 |
b:
|
|
|
4470e0 |
( (( (100, 0), (200, 0), (200, 300), (100, 300) )),
|
|
|
4470e0 |
(( (250, 100), (350, 100), (350, 200), (250, 200) )) )
|
|
|
4470e0 |
add:
|
|
|
4470e0 |
((( (100, 100), (100, 0), (400, 0), (400, 300), (0, 300), (0, 200) )))
|
|
|
4470e0 |
subtract:
|
|
|
4470e0 |
( ( ( (100, 100), (100, 300), (0, 300), (0, 200) ) ),
|
|
|
4470e0 |
( ( (200, 0), (400, 0), (400, 300), (200, 300) ),
|
|
|
4470e0 |
( (250, 100), (250, 200), (350, 200), (350, 100) ) ) )
|
|
|
4470e0 |
intersection:
|
|
|
4470e0 |
( (( (100, 100), (200, 0), (200, 100) )),
|
|
|
4470e0 |
(( (100, 200), (200, 200), (200, 300), (100, 300) )),
|
|
|
4470e0 |
(( (250, 100), (350, 100), (350, 200), (250, 200) )) )
|
|
|
4470e0 |
xor:
|
|
|
4470e0 |
( ( ( (100, 0), (200, 0), (100, 100) ) ),
|
|
|
4470e0 |
( ( (100, 100), (200, 100), (200, 0), (400, 0), (400, 300), (200, 300), (200, 200), (100, 200), (100, 300), (0, 300), (0, 200) ),
|
|
|
4470e0 |
( (250, 100), (250, 200), (350, 200), (350, 100) ) ) )
|
|
|
4470e0 |
}
|
|
|
296d46 |
|
|
|
296d46 |
{
|
|
|
296d46 |
name:
|
|
|
296d46 |
(Bad contours - cross)
|
|
|
296d46 |
badA:
|
|
|
296d46 |
((( (0, 0), (0, 100), (200, 0), (200, 100) )))
|
|
|
296d46 |
a:
|
|
|
296d46 |
( (( (0, 0), (100, 50), (0, 100) )),
|
|
|
296d46 |
(( (200, 0), (200, 100), (100, 50) )) )
|
|
|
296d46 |
}
|
|
|
296d46 |
|
|
|
296d46 |
{
|
|
|
296d46 |
name:
|
|
|
296d46 |
(Bad contours - hole)
|
|
|
296d46 |
badA:
|
|
|
296d46 |
( (( (0, 0), (300, 0), (300, 300), (0, 300) )),
|
|
|
296d46 |
(( (100, 100), (200, 100), (200, 200), (100, 200) )) )
|
|
|
296d46 |
a:
|
|
|
296d46 |
(( ( (0, 0), (300, 0), (300, 300), (0, 300) ),
|
|
|
296d46 |
( (100, 100), (100, 200), (200, 200), (200, 100) ) ))
|
|
|
296d46 |
}
|