Algorithm for joining two polygons based on set of 2D points












3












$begingroup$


[Thanks for votes, I fixed the images now]



I am working on system, that does some fuzzy logic. I don't have any special types, everything is done with simple math. The last problem I am facing is joining of individual fuzzy results. Each fuzzy result is a fuzzy set, which is in my case represented as a 4-point polygon. The final result is then using a union of two polygons.



Following image shows one version of possible result (results may vary, because that black filled part can be different for each result).





As I wrote at the beginning.. I am not using any special constructs for my operations. All fuzzy sets (polygons) are just defined by 4 points with x and y coordinates. So I start with something like:



set one = [A,B,C,D];   
set two = [E,F,G,H];


And I need an algorithm for calculating union of these two sets, so I will get result like:



set total = [I,J,K,L,M,N]; // = new points


I don't have to visualize it (even when I do..), I just need the set of points defining new polygon (union), because final result is centroid of that union and I already have algorithm to calculate centroid based on set of input points.



So far, I have found mentions about convex-hull algorithm, but I am afraid that it wouldn't generate correct result. I am afraid that it would generate following polygon:





EDIT:



Ok, I didn't realize that one upvote won't be enough.. nevermind. I'll just use links.



So different way, how to look at this problem:
I have a program, that is able to work with objects, that are represented by 4 points. Each point has two attributes (x coordinate, y coordinate).

Then the program is able to draw lines between these points. These lines will then look like a square, rectangle or polygon.. this result depends on given coordinates, but I know, that I will be always using points, that will generate polygons. Once the points are connected, the program is able to fill this connected area. Once this is drawn, you can see following image:





BUT: The program doesn't know, that he just made a polygon. He only knows, that he got 4 points from me, he connected them and filled them.



Then I have second object (=polygon), which is defined by another set of points (different coordinates). Program again doesn't know that he's creating a filled polygon.. he just did some operations with 4 given points. Result in this case is another polygon:





Now, we just draw two polygons at display.. and we gave them such coordinates, that they overlap each other. The result looks like this (considering only the filled area):





My program just draw two polygons. Fine. You can see at your screen only one polygon (because there are two overlaping = they look like one piece) and I need to count the centroid of that ONE piece.



I already have an algorithm, that will accept a set of points (representing a points forming polygon) and counting a centroid from these points. But I can't use the algorithm now, because I can't give him the needed points, because I do not know them.



Here are the points, that I want as a result:



So my algorithm should start with points A,B,C,D,E,F,G,H and he should give me points I,J,K,L,M,N as a result.



Summary: I need to count a centroid of polygon which is result of union/merge of two individual polygons, that are overlapping.



And I thought, that union of two polygons would be enough to explain :)










share|cite|improve this question











$endgroup$












  • $begingroup$
    It's not clear what you are trying to do. Can you explain more precisely what you want the result to be? What are the inputs and outputs in your example image?
    $endgroup$
    – Rahul
    May 1 '11 at 5:44










  • $begingroup$
    @Rahul Narain: I am looking for a way, how to programatically find a union of two polygons. The provided image might be confusing, because it seems like I already have it, but at image, there are actually two polygons layered, so it seems like one. My input is: 2 arrays of Point objects [A,B,C,D] and [E,F,G,H]. I need an algorithm, that will understand, that those two arrays represents coordinates of a polygon. And then the algorithm will be able to find a union of those two polygons, so the result will be one polygon (union of those two). Does it help?
    $endgroup$
    – Nsltpm
    May 1 '11 at 5:51










  • $begingroup$
    If someone could upvote me, I would try to edit my question and add new images that could help explaining it.
    $endgroup$
    – Nsltpm
    May 1 '11 at 6:00










  • $begingroup$
    @Rahul Narain: You are probably only one following this :) I have edited my question. Sorry for splitted links (there is a space after http:// ), but it's hard to post anything without 10 points :(
    $endgroup$
    – Nsltpm
    May 1 '11 at 7:03










  • $begingroup$
    Nobody? I thought that this will be some simple math algorithm :)
    $endgroup$
    – Nsltpm
    May 1 '11 at 10:38
















3












$begingroup$


[Thanks for votes, I fixed the images now]



I am working on system, that does some fuzzy logic. I don't have any special types, everything is done with simple math. The last problem I am facing is joining of individual fuzzy results. Each fuzzy result is a fuzzy set, which is in my case represented as a 4-point polygon. The final result is then using a union of two polygons.



Following image shows one version of possible result (results may vary, because that black filled part can be different for each result).





As I wrote at the beginning.. I am not using any special constructs for my operations. All fuzzy sets (polygons) are just defined by 4 points with x and y coordinates. So I start with something like:



set one = [A,B,C,D];   
set two = [E,F,G,H];


And I need an algorithm for calculating union of these two sets, so I will get result like:



set total = [I,J,K,L,M,N]; // = new points


I don't have to visualize it (even when I do..), I just need the set of points defining new polygon (union), because final result is centroid of that union and I already have algorithm to calculate centroid based on set of input points.



So far, I have found mentions about convex-hull algorithm, but I am afraid that it wouldn't generate correct result. I am afraid that it would generate following polygon:





EDIT:



Ok, I didn't realize that one upvote won't be enough.. nevermind. I'll just use links.



So different way, how to look at this problem:
I have a program, that is able to work with objects, that are represented by 4 points. Each point has two attributes (x coordinate, y coordinate).

Then the program is able to draw lines between these points. These lines will then look like a square, rectangle or polygon.. this result depends on given coordinates, but I know, that I will be always using points, that will generate polygons. Once the points are connected, the program is able to fill this connected area. Once this is drawn, you can see following image:





BUT: The program doesn't know, that he just made a polygon. He only knows, that he got 4 points from me, he connected them and filled them.



Then I have second object (=polygon), which is defined by another set of points (different coordinates). Program again doesn't know that he's creating a filled polygon.. he just did some operations with 4 given points. Result in this case is another polygon:





Now, we just draw two polygons at display.. and we gave them such coordinates, that they overlap each other. The result looks like this (considering only the filled area):





My program just draw two polygons. Fine. You can see at your screen only one polygon (because there are two overlaping = they look like one piece) and I need to count the centroid of that ONE piece.



I already have an algorithm, that will accept a set of points (representing a points forming polygon) and counting a centroid from these points. But I can't use the algorithm now, because I can't give him the needed points, because I do not know them.



Here are the points, that I want as a result:



So my algorithm should start with points A,B,C,D,E,F,G,H and he should give me points I,J,K,L,M,N as a result.



Summary: I need to count a centroid of polygon which is result of union/merge of two individual polygons, that are overlapping.



And I thought, that union of two polygons would be enough to explain :)










share|cite|improve this question











$endgroup$












  • $begingroup$
    It's not clear what you are trying to do. Can you explain more precisely what you want the result to be? What are the inputs and outputs in your example image?
    $endgroup$
    – Rahul
    May 1 '11 at 5:44










  • $begingroup$
    @Rahul Narain: I am looking for a way, how to programatically find a union of two polygons. The provided image might be confusing, because it seems like I already have it, but at image, there are actually two polygons layered, so it seems like one. My input is: 2 arrays of Point objects [A,B,C,D] and [E,F,G,H]. I need an algorithm, that will understand, that those two arrays represents coordinates of a polygon. And then the algorithm will be able to find a union of those two polygons, so the result will be one polygon (union of those two). Does it help?
    $endgroup$
    – Nsltpm
    May 1 '11 at 5:51










  • $begingroup$
    If someone could upvote me, I would try to edit my question and add new images that could help explaining it.
    $endgroup$
    – Nsltpm
    May 1 '11 at 6:00










  • $begingroup$
    @Rahul Narain: You are probably only one following this :) I have edited my question. Sorry for splitted links (there is a space after http:// ), but it's hard to post anything without 10 points :(
    $endgroup$
    – Nsltpm
    May 1 '11 at 7:03










  • $begingroup$
    Nobody? I thought that this will be some simple math algorithm :)
    $endgroup$
    – Nsltpm
    May 1 '11 at 10:38














3












3








3





$begingroup$


[Thanks for votes, I fixed the images now]



I am working on system, that does some fuzzy logic. I don't have any special types, everything is done with simple math. The last problem I am facing is joining of individual fuzzy results. Each fuzzy result is a fuzzy set, which is in my case represented as a 4-point polygon. The final result is then using a union of two polygons.



Following image shows one version of possible result (results may vary, because that black filled part can be different for each result).





As I wrote at the beginning.. I am not using any special constructs for my operations. All fuzzy sets (polygons) are just defined by 4 points with x and y coordinates. So I start with something like:



set one = [A,B,C,D];   
set two = [E,F,G,H];


And I need an algorithm for calculating union of these two sets, so I will get result like:



set total = [I,J,K,L,M,N]; // = new points


I don't have to visualize it (even when I do..), I just need the set of points defining new polygon (union), because final result is centroid of that union and I already have algorithm to calculate centroid based on set of input points.



So far, I have found mentions about convex-hull algorithm, but I am afraid that it wouldn't generate correct result. I am afraid that it would generate following polygon:





EDIT:



Ok, I didn't realize that one upvote won't be enough.. nevermind. I'll just use links.



So different way, how to look at this problem:
I have a program, that is able to work with objects, that are represented by 4 points. Each point has two attributes (x coordinate, y coordinate).

Then the program is able to draw lines between these points. These lines will then look like a square, rectangle or polygon.. this result depends on given coordinates, but I know, that I will be always using points, that will generate polygons. Once the points are connected, the program is able to fill this connected area. Once this is drawn, you can see following image:





BUT: The program doesn't know, that he just made a polygon. He only knows, that he got 4 points from me, he connected them and filled them.



Then I have second object (=polygon), which is defined by another set of points (different coordinates). Program again doesn't know that he's creating a filled polygon.. he just did some operations with 4 given points. Result in this case is another polygon:





Now, we just draw two polygons at display.. and we gave them such coordinates, that they overlap each other. The result looks like this (considering only the filled area):





My program just draw two polygons. Fine. You can see at your screen only one polygon (because there are two overlaping = they look like one piece) and I need to count the centroid of that ONE piece.



I already have an algorithm, that will accept a set of points (representing a points forming polygon) and counting a centroid from these points. But I can't use the algorithm now, because I can't give him the needed points, because I do not know them.



Here are the points, that I want as a result:



So my algorithm should start with points A,B,C,D,E,F,G,H and he should give me points I,J,K,L,M,N as a result.



Summary: I need to count a centroid of polygon which is result of union/merge of two individual polygons, that are overlapping.



And I thought, that union of two polygons would be enough to explain :)










share|cite|improve this question











$endgroup$




[Thanks for votes, I fixed the images now]



I am working on system, that does some fuzzy logic. I don't have any special types, everything is done with simple math. The last problem I am facing is joining of individual fuzzy results. Each fuzzy result is a fuzzy set, which is in my case represented as a 4-point polygon. The final result is then using a union of two polygons.



Following image shows one version of possible result (results may vary, because that black filled part can be different for each result).





As I wrote at the beginning.. I am not using any special constructs for my operations. All fuzzy sets (polygons) are just defined by 4 points with x and y coordinates. So I start with something like:



set one = [A,B,C,D];   
set two = [E,F,G,H];


And I need an algorithm for calculating union of these two sets, so I will get result like:



set total = [I,J,K,L,M,N]; // = new points


I don't have to visualize it (even when I do..), I just need the set of points defining new polygon (union), because final result is centroid of that union and I already have algorithm to calculate centroid based on set of input points.



So far, I have found mentions about convex-hull algorithm, but I am afraid that it wouldn't generate correct result. I am afraid that it would generate following polygon:





EDIT:



Ok, I didn't realize that one upvote won't be enough.. nevermind. I'll just use links.



So different way, how to look at this problem:
I have a program, that is able to work with objects, that are represented by 4 points. Each point has two attributes (x coordinate, y coordinate).

Then the program is able to draw lines between these points. These lines will then look like a square, rectangle or polygon.. this result depends on given coordinates, but I know, that I will be always using points, that will generate polygons. Once the points are connected, the program is able to fill this connected area. Once this is drawn, you can see following image:





BUT: The program doesn't know, that he just made a polygon. He only knows, that he got 4 points from me, he connected them and filled them.



Then I have second object (=polygon), which is defined by another set of points (different coordinates). Program again doesn't know that he's creating a filled polygon.. he just did some operations with 4 given points. Result in this case is another polygon:





Now, we just draw two polygons at display.. and we gave them such coordinates, that they overlap each other. The result looks like this (considering only the filled area):





My program just draw two polygons. Fine. You can see at your screen only one polygon (because there are two overlaping = they look like one piece) and I need to count the centroid of that ONE piece.



I already have an algorithm, that will accept a set of points (representing a points forming polygon) and counting a centroid from these points. But I can't use the algorithm now, because I can't give him the needed points, because I do not know them.



Here are the points, that I want as a result:



So my algorithm should start with points A,B,C,D,E,F,G,H and he should give me points I,J,K,L,M,N as a result.



Summary: I need to count a centroid of polygon which is result of union/merge of two individual polygons, that are overlapping.



And I thought, that union of two polygons would be enough to explain :)







calculus geometry algorithms






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Dec 25 '18 at 21:33









Glorfindel

3,42981830




3,42981830










asked May 1 '11 at 1:47









NsltpmNsltpm

193




193












  • $begingroup$
    It's not clear what you are trying to do. Can you explain more precisely what you want the result to be? What are the inputs and outputs in your example image?
    $endgroup$
    – Rahul
    May 1 '11 at 5:44










  • $begingroup$
    @Rahul Narain: I am looking for a way, how to programatically find a union of two polygons. The provided image might be confusing, because it seems like I already have it, but at image, there are actually two polygons layered, so it seems like one. My input is: 2 arrays of Point objects [A,B,C,D] and [E,F,G,H]. I need an algorithm, that will understand, that those two arrays represents coordinates of a polygon. And then the algorithm will be able to find a union of those two polygons, so the result will be one polygon (union of those two). Does it help?
    $endgroup$
    – Nsltpm
    May 1 '11 at 5:51










  • $begingroup$
    If someone could upvote me, I would try to edit my question and add new images that could help explaining it.
    $endgroup$
    – Nsltpm
    May 1 '11 at 6:00










  • $begingroup$
    @Rahul Narain: You are probably only one following this :) I have edited my question. Sorry for splitted links (there is a space after http:// ), but it's hard to post anything without 10 points :(
    $endgroup$
    – Nsltpm
    May 1 '11 at 7:03










  • $begingroup$
    Nobody? I thought that this will be some simple math algorithm :)
    $endgroup$
    – Nsltpm
    May 1 '11 at 10:38


















  • $begingroup$
    It's not clear what you are trying to do. Can you explain more precisely what you want the result to be? What are the inputs and outputs in your example image?
    $endgroup$
    – Rahul
    May 1 '11 at 5:44










  • $begingroup$
    @Rahul Narain: I am looking for a way, how to programatically find a union of two polygons. The provided image might be confusing, because it seems like I already have it, but at image, there are actually two polygons layered, so it seems like one. My input is: 2 arrays of Point objects [A,B,C,D] and [E,F,G,H]. I need an algorithm, that will understand, that those two arrays represents coordinates of a polygon. And then the algorithm will be able to find a union of those two polygons, so the result will be one polygon (union of those two). Does it help?
    $endgroup$
    – Nsltpm
    May 1 '11 at 5:51










  • $begingroup$
    If someone could upvote me, I would try to edit my question and add new images that could help explaining it.
    $endgroup$
    – Nsltpm
    May 1 '11 at 6:00










  • $begingroup$
    @Rahul Narain: You are probably only one following this :) I have edited my question. Sorry for splitted links (there is a space after http:// ), but it's hard to post anything without 10 points :(
    $endgroup$
    – Nsltpm
    May 1 '11 at 7:03










  • $begingroup$
    Nobody? I thought that this will be some simple math algorithm :)
    $endgroup$
    – Nsltpm
    May 1 '11 at 10:38
















$begingroup$
It's not clear what you are trying to do. Can you explain more precisely what you want the result to be? What are the inputs and outputs in your example image?
$endgroup$
– Rahul
May 1 '11 at 5:44




$begingroup$
It's not clear what you are trying to do. Can you explain more precisely what you want the result to be? What are the inputs and outputs in your example image?
$endgroup$
– Rahul
May 1 '11 at 5:44












$begingroup$
@Rahul Narain: I am looking for a way, how to programatically find a union of two polygons. The provided image might be confusing, because it seems like I already have it, but at image, there are actually two polygons layered, so it seems like one. My input is: 2 arrays of Point objects [A,B,C,D] and [E,F,G,H]. I need an algorithm, that will understand, that those two arrays represents coordinates of a polygon. And then the algorithm will be able to find a union of those two polygons, so the result will be one polygon (union of those two). Does it help?
$endgroup$
– Nsltpm
May 1 '11 at 5:51




$begingroup$
@Rahul Narain: I am looking for a way, how to programatically find a union of two polygons. The provided image might be confusing, because it seems like I already have it, but at image, there are actually two polygons layered, so it seems like one. My input is: 2 arrays of Point objects [A,B,C,D] and [E,F,G,H]. I need an algorithm, that will understand, that those two arrays represents coordinates of a polygon. And then the algorithm will be able to find a union of those two polygons, so the result will be one polygon (union of those two). Does it help?
$endgroup$
– Nsltpm
May 1 '11 at 5:51












$begingroup$
If someone could upvote me, I would try to edit my question and add new images that could help explaining it.
$endgroup$
– Nsltpm
May 1 '11 at 6:00




$begingroup$
If someone could upvote me, I would try to edit my question and add new images that could help explaining it.
$endgroup$
– Nsltpm
May 1 '11 at 6:00












$begingroup$
@Rahul Narain: You are probably only one following this :) I have edited my question. Sorry for splitted links (there is a space after http:// ), but it's hard to post anything without 10 points :(
$endgroup$
– Nsltpm
May 1 '11 at 7:03




$begingroup$
@Rahul Narain: You are probably only one following this :) I have edited my question. Sorry for splitted links (there is a space after http:// ), but it's hard to post anything without 10 points :(
$endgroup$
– Nsltpm
May 1 '11 at 7:03












$begingroup$
Nobody? I thought that this will be some simple math algorithm :)
$endgroup$
– Nsltpm
May 1 '11 at 10:38




$begingroup$
Nobody? I thought that this will be some simple math algorithm :)
$endgroup$
– Nsltpm
May 1 '11 at 10:38










1 Answer
1






active

oldest

votes


















1












$begingroup$

I think the reason you're not getting any answers is that you asked a rather long question that's almost entirely algorithmic, with little or no mathematical content, and answers can easily be found by searching the Web e.g. for "merging polygons". Here's a post in comp.graphics.algorithms that answers your question in the general case. For your simple case, I'd suggest a), which is much simpler to implement than b) and c). Note, however, that this sort of thing is prone to rounding problems -- if it's possible that one of your points lies exactly on the boundary of the other polygon, that's likely to spell trouble because you won't be able to detect that exactly when intersecting the lines and you somehow have to make sure that different intersection tests are consistent despite rounding, e.g. you have to make sure you don't miss an intersection because both lines emanating from a point on the boundary test as non-intersecting because of rounding.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    Ok, thank you. Sorry for long question, I tried to make it shorter, but I probably didn't explain it well so I had to add more.
    $endgroup$
    – Nsltpm
    May 2 '11 at 6:30











Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f36118%2falgorithm-for-joining-two-polygons-based-on-set-of-2d-points%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1












$begingroup$

I think the reason you're not getting any answers is that you asked a rather long question that's almost entirely algorithmic, with little or no mathematical content, and answers can easily be found by searching the Web e.g. for "merging polygons". Here's a post in comp.graphics.algorithms that answers your question in the general case. For your simple case, I'd suggest a), which is much simpler to implement than b) and c). Note, however, that this sort of thing is prone to rounding problems -- if it's possible that one of your points lies exactly on the boundary of the other polygon, that's likely to spell trouble because you won't be able to detect that exactly when intersecting the lines and you somehow have to make sure that different intersection tests are consistent despite rounding, e.g. you have to make sure you don't miss an intersection because both lines emanating from a point on the boundary test as non-intersecting because of rounding.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    Ok, thank you. Sorry for long question, I tried to make it shorter, but I probably didn't explain it well so I had to add more.
    $endgroup$
    – Nsltpm
    May 2 '11 at 6:30
















1












$begingroup$

I think the reason you're not getting any answers is that you asked a rather long question that's almost entirely algorithmic, with little or no mathematical content, and answers can easily be found by searching the Web e.g. for "merging polygons". Here's a post in comp.graphics.algorithms that answers your question in the general case. For your simple case, I'd suggest a), which is much simpler to implement than b) and c). Note, however, that this sort of thing is prone to rounding problems -- if it's possible that one of your points lies exactly on the boundary of the other polygon, that's likely to spell trouble because you won't be able to detect that exactly when intersecting the lines and you somehow have to make sure that different intersection tests are consistent despite rounding, e.g. you have to make sure you don't miss an intersection because both lines emanating from a point on the boundary test as non-intersecting because of rounding.






share|cite|improve this answer









$endgroup$













  • $begingroup$
    Ok, thank you. Sorry for long question, I tried to make it shorter, but I probably didn't explain it well so I had to add more.
    $endgroup$
    – Nsltpm
    May 2 '11 at 6:30














1












1








1





$begingroup$

I think the reason you're not getting any answers is that you asked a rather long question that's almost entirely algorithmic, with little or no mathematical content, and answers can easily be found by searching the Web e.g. for "merging polygons". Here's a post in comp.graphics.algorithms that answers your question in the general case. For your simple case, I'd suggest a), which is much simpler to implement than b) and c). Note, however, that this sort of thing is prone to rounding problems -- if it's possible that one of your points lies exactly on the boundary of the other polygon, that's likely to spell trouble because you won't be able to detect that exactly when intersecting the lines and you somehow have to make sure that different intersection tests are consistent despite rounding, e.g. you have to make sure you don't miss an intersection because both lines emanating from a point on the boundary test as non-intersecting because of rounding.






share|cite|improve this answer









$endgroup$



I think the reason you're not getting any answers is that you asked a rather long question that's almost entirely algorithmic, with little or no mathematical content, and answers can easily be found by searching the Web e.g. for "merging polygons". Here's a post in comp.graphics.algorithms that answers your question in the general case. For your simple case, I'd suggest a), which is much simpler to implement than b) and c). Note, however, that this sort of thing is prone to rounding problems -- if it's possible that one of your points lies exactly on the boundary of the other polygon, that's likely to spell trouble because you won't be able to detect that exactly when intersecting the lines and you somehow have to make sure that different intersection tests are consistent despite rounding, e.g. you have to make sure you don't miss an intersection because both lines emanating from a point on the boundary test as non-intersecting because of rounding.







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered May 1 '11 at 19:35









jorikijoriki

171k10188349




171k10188349












  • $begingroup$
    Ok, thank you. Sorry for long question, I tried to make it shorter, but I probably didn't explain it well so I had to add more.
    $endgroup$
    – Nsltpm
    May 2 '11 at 6:30


















  • $begingroup$
    Ok, thank you. Sorry for long question, I tried to make it shorter, but I probably didn't explain it well so I had to add more.
    $endgroup$
    – Nsltpm
    May 2 '11 at 6:30
















$begingroup$
Ok, thank you. Sorry for long question, I tried to make it shorter, but I probably didn't explain it well so I had to add more.
$endgroup$
– Nsltpm
May 2 '11 at 6:30




$begingroup$
Ok, thank you. Sorry for long question, I tried to make it shorter, but I probably didn't explain it well so I had to add more.
$endgroup$
– Nsltpm
May 2 '11 at 6:30


















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f36118%2falgorithm-for-joining-two-polygons-based-on-set-of-2d-points%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Wiesbaden

Marschland

To store a contact into the json file from server.js file using a class in NodeJS