distance two Polygon_2

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

distance two Polygon_2

xoru
I have two polygon 2D (Polygon_2 type)
How count distance between A and B
 
Distance is outer on one of shapes.
 
if edges of A and outher of B touch together distance is
 
 
Reply | Threaded
Open this post in threaded view
|

Re: distance two Polygon_2

Renato

On Tue, Feb 20, 2018 at 7:46 AM, xoru <[hidden email]> wrote:
I have two polygon 2D (Polygon_2 type)
How count distance between A and B
 
Distance is outer on one of shapes.
 
if edges of A and outher of B touch together distance is
 
 



--
Renato Silveira
     Ph.D. in Computer Science
     NTU / UFRGS | Núcleo de Tecnologia Urbana

     Porto Alegre - RS - Brazil


Reply | Threaded
Open this post in threaded view
|

Re: distance two Polygon_2

xoru
In reply to this post by xoru
 
Hm, ...
Tell me letter 'T' or 'C' is convex? My shapes no have holes.
 
union of ( 0,0 1,0 1,1 0,1 ) and (1,1 2,1 2,2 1,2) is convex?
/two box joined one corner/
 
?
 
How count distance between A and B
 
Distance is outer on one of shapes.
 
if edges of A and outher of B touch together distance is
 
Reply | Threaded
Open this post in threaded view
|

Re: distance two Polygon_2

Florian Prud'homme
Hi

according to : https://www.mathopenref.com/polygonconvex.html

your union of box is concave... So it does not work.

You can split your concave polygon into several convex polygons ( 2 boxes
for examples), and taking the minimum distance from the set of polygons. So
you have to compute the distance from the 2 boxes.



--
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


Reply | Threaded
Open this post in threaded view
|

Re: distance two Polygon_2

Renato
In reply to this post by xoru


On Thu, Mar 1, 2018 at 4:13 AM, xoru <[hidden email]> wrote:
 
Hm, ...
Tell me letter 'T' or 'C' is convex? My shapes no have holes.
 
No.
 
union of ( 0,0 1,0 1,1 0,1 ) and (1,1 2,1 2,2 1,2) is convex?
/two box joined one corner/
 
?

No. =(
 
 
How count distance between A and B
 
Distance is outer on one of shapes.
 
if edges of A and outher of B touch together distance is
 



--
Renato Silveira
     Ph.D. in Computer Science
     NTU / UFRGS | Núcleo de Tecnologia Urbana

     Porto Alegre - RS - Brazil