Subject: CGAL users discussion list
List archive
[cgal-discuss] 回复: 回复: 回复: 回复: difference for 2d polygons return incorrect polygon
Chronological Thread
- From: 落 域 <>
- To: "" <>
- Subject: [cgal-discuss] 回复: 回复: 回复: 回复: difference for 2d polygons return incorrect polygon
- Date: Mon, 27 Apr 2020 09:04:42 +0000
- Accept-language: zh-CN, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bPE55H4j4+WjI/E/UCO347uyS6PkHN7fTT+2KdOHdAs=; b=cwTT5+JNe/0Q5G+pZ15+LtPk9oX6mepIH2qJWc/oFGLC5ZtV3ZtNesOFLNFfSbLPi0qiy0zjL2RnlBZa0ydIqQYx/Lb19ipVcq85HQ264UQcrpyOuWbmE43RCndPKbmft5O8o8hxbzP6Vma97VJV0mzMA0F2Hqzeby7xsPdupnoJdNrtDqM2y9OhGqVC+9tn9EYUQ5XwObOrsNVIFF9utWMmr5r+5pvo+v+z7ULZbx3xF40PV79wC1/Lv80VQfs/IA6wVBWDrKuIB2NtyDEdqccqwgB/L0WVtipUP294JeR0nmR4wPOlJyyc2AeNjmvQGlKf6qndx1MNvsHm1mAWWA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Tfct7I8+yc74LMdY3df4xtW7rlkSihkyBgXDLssYJfUJRhqHmywvflin/tOOuNqVm2dImYEVRXubuKLG1hf1hztZLPDPqQkpr27rFIpnCtL5jb8rTP+xCEKN9nLYu8thO4qPegy9DEsDrp0LMNLeLB2VI4PFZ9v9oDrtkH+WIpv+n5Aee67vJD92vkl0zqnvveQGhuQcSsiMMcoo/15tEZwV0a5HTIE/fY8nFoYnlCubO7U6kY0FrtvRcrBDRLJoNq5RjlEf4+Vx8HFTrOxgs3Ryt7nPS7WcbCNYa7gPXgJMX9wi40P+jnficAkTyFwAFuo47iR2+LURycyiIsi1JQ==
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=Pass
- Ironport-phdr: 9a23:kuYKAxXHHXgBgK13WpaYLOQwzRTV8LGtZVwlr6E/grcLSJyIuqrYZRSDtadThVPEFb/W9+hDw7KP9fy5BCpdsN3Z4TgrS99lb1c9k8IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUhrwOhBoKevrB4Xck9q41/yo+53Ufg5EmCexbal9IRmrrQjdrMkbjI9tJqotzhbCv2dFdflRyW50P1yYggzy5t23/J5t8iRQv+wu+stdWqjkfKo2UKJVAi0+P286+MPkux/DTRCS5nQHSWUZjgBIAwne4x7kWJr6rzb3ufB82CmeOs32UKw0VDG/5KplVBPklCEKPCM//WrKiMJ/kbhbrQqhqRJh3oDUfI+bOvlwfqzfYdwVSnFMUdxNWyBdGI6wc5cDAPAHMO1Fr4f9vVwOrR6mCAuqGejtzCJDi3j23a0+zugtDwLL0BIvEt8OsXnZrNX4OacJXOCy0anI0THDb/RR2Tf+8oTHbhchofSVUL92bMHfx04vFwbfgVWRr4zoJzWV2f4WvGeA6+pvS/ijhHIgqwF0ujSvx8EsipPIho0P0FzE+z95zYAoLtO7UE52edGpHIdKuyyeKYd6WN0uTmFmtSog17EKpYO3cDAUxJs92xLTdvmKf5WV7h7+UeuePzh1iG55dL+6hRu971OvxfH5W8Sx31tHoCxImcTWuH8XzRzc8M2HR+N9/ki/3TaP0Bje5/1eL00qiabXNoctzKMxmJYNqEjDGTT5l1vsgK+Ra0Uk5vOn6+P6YrXgu5CQLZd0ihv5MqQyhMOwHfg4MgkJX2id4+i806Dj/VH9QLVNif02kbPVv4zdJcQevqK5AglV3Zg/6xunADqqzM4UkH0ZIF5fZh6Kj4bkN0vTLPzkEPuzm1Gsny1qx/DCML3hGJLNLn3bnbfhebZx9lBQxQktwd1Q559ZC7EMLfLzV0Lqs9zYEwM5Mwizw+bgC9VxzJ8RWWWKAqOBKqPdrUeI5v4zI+mLfIIapDn9JOIh5/L3kHA5mEQdcrW03ZsMc3C1Be9mIkWcYXr0mNgNC2YKvgwkTOzrklKOSzBTZ2zhF586/SwxXYK6EZ/YFMfqm62ExC79H5tMZ2kABErLCmbtb4zDWvECb2WZLcZl1zAFTrO8UJRy6Be1qQXa179je+rI5jUD59Wkz8lw/+SVlBco9DUyAd7ayHCIV2gzn2UGQHg906l75EB80VyeyrMrvvpDCNZv6uNVBwcmKYbHnas9EMH3QguHf9GTSV/gTM/hGiA0Vtt2wtkAZAF2FNymyxzCxCG3GKRGq7veTpc7+6aZ03nqLNtm0F7H0rMghh8oWIEHYWapj6o6+wnIDJPSiG2YkbyrfOISxnie2n2EyD929LkQBA50CP+VByxCOBaL8Pz++1/GSLitT78gN10Smoa5NqJWZ4ix3h19T/D5NYGGOj7jqyKLHR+Ng4i0Qs/yYWxEh3faFVQAlAcQu32BMFpmX3bzkyflFDVrUGnXTQbp+Oh6pmm8SxZvnQaXc0lm0Lnz8RkQ16XFFqEjm4kcsSJkkA1aWVaw29WKVIipnyE5JeBnTol4511Kk2XEqwZ6I5qsabh4gUITeBh2uEWo0AhrDoJHko4hq3Z4lQc=
Hey axnmol,
If I use the CGAL::collinear() with three Point_2 variables to check the point is or not collinear, the function tells me the point is not collinear with the segment, but
when I use the CGAL::Segment_2::collinear_has_on() to check the point is or not collinear, and this function tells me the point is collinear with the segment.
Does the CGAL::collinear() has any difference with CGAL::Segment_2::collinear_has_on()?
void testPointCollinear()
{
Point_2 startPoint(220.240005, -121.932671);
Point_2 endPoint(-369.040009, -439.420013);
Point_2 checkPoint(-49.0955925, -267.043030);
CGAL::Segment_2<Kernel> testSegment(startPoint, endPoint);
if (testSegment.collinear_has_on(checkPoint)) {
std::cout << "points collinear" << std::endl;
}
else {
std::cout << "points not collinear" << std::endl;
}
}
And yes, you are right, I convert the Point_2 to the graphing software's struct, the struct defined by the float.
When I convert the Point_2 to the float struct, then convert it back to the Point_2, what should I do to provide the point is collinear with the segment, can you give me some suggest?
发件人: <> 代表 axnmol <>
发送时间: 2020年4月27日 7:58
收件人: <>
主题: Re: [cgal-discuss] 回复: 回复: 回复: difference for 2d polygons return incorrect polygon
发送时间: 2020年4月27日 7:58
收件人: <>
主题: Re: [cgal-discuss] 回复: 回复: 回复: difference for 2d polygons return incorrect polygon
Hey Luoyo,
I don't think the points you are expecting here are collinear. Thats why the
resultant polygon includes the point (220.240005 , -121.932671).
<http://cgal-discuss.949826.n4.nabble.com/file/t376209/Capture.png>
The graphing software you are using may be doing some rounding error as i
may not be using exact predicates. You can check if these points are
collinear in CGAL as :
Point_2 x, y, z;
x = Point_2(220.240005, -121.932671);
y = Point_2(-369.040009, -439.420013);
z = Point_2(-49.0955925, -267.043030);
if (CGAL::collinear(x, y, z))std::cout << "yes";
Regards.
--
Sent from: http://cgal-discuss.949826.n4.nabble.com/
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
I don't think the points you are expecting here are collinear. Thats why the
resultant polygon includes the point (220.240005 , -121.932671).
<http://cgal-discuss.949826.n4.nabble.com/file/t376209/Capture.png>
The graphing software you are using may be doing some rounding error as i
may not be using exact predicates. You can check if these points are
collinear in CGAL as :
Point_2 x, y, z;
x = Point_2(220.240005, -121.932671);
y = Point_2(-369.040009, -439.420013);
z = Point_2(-49.0955925, -267.043030);
if (CGAL::collinear(x, y, z))std::cout << "yes";
Regards.
--
Sent from: http://cgal-discuss.949826.n4.nabble.com/
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
- [cgal-discuss] difference for 2d polygons return incorrect polygon, Luoyu, 04/26/2020
- Re: [cgal-discuss] difference for 2d polygons return incorrect polygon, Efi Fogel, 04/26/2020
- [cgal-discuss] 回复: difference for 2d polygons return incorrect polygon, 落 域, 04/26/2020
- Re: [cgal-discuss] 回复: difference for 2d polygons return incorrect polygon, Efi Fogel, 04/26/2020
- [cgal-discuss] 回复: 回复: difference for 2d polygons return incorrect polygon, 落 域, 04/26/2020
- [cgal-discuss] 回复: 回复: difference for 2d polygons return incorrect polygon, 落 域, 04/27/2020
- Re: [cgal-discuss] 回复: 回复: difference for 2d polygons return incorrect polygon, axnmol, 04/27/2020
- [cgal-discuss] 回复: 回复: 回复: difference for 2d polygons return incorrect polygon, 落 域, 04/27/2020
- Re: [cgal-discuss] 回复: 回复: 回复: difference for 2d polygons return incorrect polygon, axnmol, 04/27/2020
- [cgal-discuss] 回复: 回复: 回复: 回复: difference for 2d polygons return incorrect polygon, 落 域, 04/27/2020
- Re: [cgal-discuss] 回复: 回复: 回复: 回复: difference for 2d polygons return incorrect polygon, axnmol, 04/27/2020
- [cgal-discuss] 回复: 回复: 回复: 回复: 回复: difference for 2d polygons return incorrect polygon, 落 域, 04/27/2020
- Re: [cgal-discuss] 回复: 回复: 回复: 回复: 回复: difference for 2d polygons return incorrect polygon, axnmol, 04/27/2020
- [cgal-discuss] 回复: 回复: 回复: 回复: 回复: 回复: difference for 2d polygons return incorrect polygon, 落 域, 04/27/2020
- Re: [cgal-discuss] 回复: 回复: 回复: 回复: 回复: 回复: difference for 2d polygons return incorrect polygon, axnmol, 04/27/2020
- [cgal-discuss] 回复: 回复: 回复: difference for 2d polygons return incorrect polygon, 落 域, 04/27/2020
- Re: [cgal-discuss] 回复: 回复: difference for 2d polygons return incorrect polygon, axnmol, 04/27/2020
- Re: [cgal-discuss] 回复: difference for 2d polygons return incorrect polygon, Efi Fogel, 04/26/2020
- [cgal-discuss] 回复: difference for 2d polygons return incorrect polygon, 落 域, 04/26/2020
- Re: [cgal-discuss] difference for 2d polygons return incorrect polygon, Efi Fogel, 04/26/2020
Archive powered by MHonArc 2.6.18.