[OpenJDK 2D-Dev] CubicCurve2D.solveCubic and containment/intersection bugs.

Jim Graham james.graham at oracle.com
Tue Jan 25 02:05:16 UTC 2011


Hi Denis,

On 1/24/2011 3:41 PM, Denis Lila wrote:
>> Perhaps the problem is less with the word "boundary" than it
>> is with confusing our use of the word inside to describe the
>> concept of filling and containment with the topological concept
>> that a set has an interior in addition to (and mostly separate from)
>> its boundary?
>
> That was exactly the problem. We classify every point as either inside
> or outside, and I'm used to the interior, exterior, and boundary being
> disjoint.

Right, my point was that the problem here isn't that we use the word 
boundary, since when we use it we do acknowledge that there are points 
"on" the boundary.  The problem is that our definition of "inside" is 
not similar to the topological definition of "interior".

Topology has interior, boundary, and exterior as disjoint sets.

Our definitions have inside and outside as disjoint sets, and we use the 
word boundary only to describe how to determine which points are divided 
into inside and outside - and I think our definition of boundary is 
compatible with the topological concept.  It's just that when we refer 
to "inside" it may contain some points on the boundary, unlike the 
topological "interior" which would not.

So, if you don't equate our "inside" term with topological "interior" 
then there is no conflict with the fact that both fields use the term 
boundary (and I think both use them compatibly).

Our "inside" is the topological "interior" unioned with the set of 
points in/on the topological "boundary" that satisfy the "interior is 
below or to the right" property.

Inside == Interior + ~half of Boundary
Outside == Exterior + ~half of Boundary

Interior+Boundary+Exterior == whole plane
No 2 of Interior, Boundary, or Exterior intersect

Inside+Outside == whole plane
Inside does not intersect Outside

Inside is a superset of Interior
Outside is a superset of Exterior
Both Inside and Outside intersect Boundary

			...jim



More information about the 2d-dev mailing list