You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Luc Maisonobe <lu...@spaceroots.org> on 2013/08/03 15:52:03 UTC

Re: [math] Union Produces In-Line Vertex

Hi Curtis,

Le 29/07/2013 23:37, Curtis Jensen a écrit :
> The 2D Euclidean union function sometimes produces an extra, in-line, vertex.
> 
> For example, in the "testUnion" function in the
> org.apache.commons.math3.geometry.euclidean.twod.PolygonsSetTest, the
> "set" produced by the union of "set1" and "set2" has 9 vertices. I
> believe that there should only be 8.  The extra vertex is 3,2; which
> is in-line between the vertices 3,1 and 3,3.
> 
> The overall shape of the union is correct; however, there is a vertex
> that really is not a vertex (an intersection of two distinct line
> segments).
> 
> Is this the intended behavior or perhaps a bug?

It is an artefact of the way the outline is built. The inner
representation is not an outline (it's a BSP tree) so there is a
transformation to recover the boundary. Extra points may occur here.

For now, we don't renormalize the boundary representation after building it.

best regards,
Luc

> 
> Thanks,
> Curtis
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [math] Union Produces In-Line Vertex

Posted by Curtis Jensen <cu...@the-jensens.org>.
On Sat, Aug 3, 2013 at 6:52 AM, Luc Maisonobe <lu...@spaceroots.org> wrote:
> Hi Curtis,
>
> Le 29/07/2013 23:37, Curtis Jensen a écrit :
>> The 2D Euclidean union function sometimes produces an extra, in-line, vertex.
>>
>> For example, in the "testUnion" function in the
>> org.apache.commons.math3.geometry.euclidean.twod.PolygonsSetTest, the
>> "set" produced by the union of "set1" and "set2" has 9 vertices. I
>> believe that there should only be 8.  The extra vertex is 3,2; which
>> is in-line between the vertices 3,1 and 3,3.
>>
>> The overall shape of the union is correct; however, there is a vertex
>> that really is not a vertex (an intersection of two distinct line
>> segments).
>>
>> Is this the intended behavior or perhaps a bug?
>
> It is an artefact of the way the outline is built. The inner
> representation is not an outline (it's a BSP tree) so there is a
> transformation to recover the boundary. Extra points may occur here.
>
> For now, we don't renormalize the boundary representation after building it.
>

Understood.  I'll accept that those points might show up in the unions.

Thanks for the explanation,
Curtis

> best regards,
> Luc
>
>>
>> Thanks,
>> Curtis
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org