Divide shape into polygons
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have a shape, described by its edges. For example, this shape:
I want to find all of the polygons that create this shape. Something similar to that:
I managed to do that by rendering an image and then finding its' contours (Something similar to findContours in OpenCV). But by rendering an image and finding shapes within it, I'm losing precision, which is unwanted.
geometry polygons
add a comment |Â
up vote
0
down vote
favorite
I have a shape, described by its edges. For example, this shape:
I want to find all of the polygons that create this shape. Something similar to that:
I managed to do that by rendering an image and then finding its' contours (Something similar to findContours in OpenCV). But by rendering an image and finding shapes within it, I'm losing precision, which is unwanted.
geometry polygons
2
Find the intersections of the edges. Start from one of them and go on an edge. At each intersection, go left if there is an edge that way, otherwise straight ahead if the edge continues, otherwise right. Keep going until you return to the starting point. You just found the first polygon. Repeat as necessary.
– dxiv
Aug 2 at 21:58
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a shape, described by its edges. For example, this shape:
I want to find all of the polygons that create this shape. Something similar to that:
I managed to do that by rendering an image and then finding its' contours (Something similar to findContours in OpenCV). But by rendering an image and finding shapes within it, I'm losing precision, which is unwanted.
geometry polygons
I have a shape, described by its edges. For example, this shape:
I want to find all of the polygons that create this shape. Something similar to that:
I managed to do that by rendering an image and then finding its' contours (Something similar to findContours in OpenCV). But by rendering an image and finding shapes within it, I'm losing precision, which is unwanted.
geometry polygons
edited Aug 2 at 21:48
Adrian Keister
3,49321533
3,49321533
asked Aug 2 at 21:47
user972014
1011
1011
2
Find the intersections of the edges. Start from one of them and go on an edge. At each intersection, go left if there is an edge that way, otherwise straight ahead if the edge continues, otherwise right. Keep going until you return to the starting point. You just found the first polygon. Repeat as necessary.
– dxiv
Aug 2 at 21:58
add a comment |Â
2
Find the intersections of the edges. Start from one of them and go on an edge. At each intersection, go left if there is an edge that way, otherwise straight ahead if the edge continues, otherwise right. Keep going until you return to the starting point. You just found the first polygon. Repeat as necessary.
– dxiv
Aug 2 at 21:58
2
2
Find the intersections of the edges. Start from one of them and go on an edge. At each intersection, go left if there is an edge that way, otherwise straight ahead if the edge continues, otherwise right. Keep going until you return to the starting point. You just found the first polygon. Repeat as necessary.
– dxiv
Aug 2 at 21:58
Find the intersections of the edges. Start from one of them and go on an edge. At each intersection, go left if there is an edge that way, otherwise straight ahead if the edge continues, otherwise right. Keep going until you return to the starting point. You just found the first polygon. Repeat as necessary.
– dxiv
Aug 2 at 21:58
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2870516%2fdivide-shape-into-polygons%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
2
Find the intersections of the edges. Start from one of them and go on an edge. At each intersection, go left if there is an edge that way, otherwise straight ahead if the edge continues, otherwise right. Keep going until you return to the starting point. You just found the first polygon. Repeat as necessary.
– dxiv
Aug 2 at 21:58