Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Unexpected intersection between parallel polygons.

The intersection function returns a non-empty intersection for two polygons that are separated in space.

The following is a reproducible example:

# Define parallel polygons.
a = Polyhedron([[0, -1, 1], [1, -1, 1], [1, 1, -1]])
b = Polyhedron([[0.0, -0.5, 1.5], [1.0, -0.5, 1.5], [1.0, 1.5, -0.5]])

# Intersection.
c = a.intersection(b)

# c -> 
# `A 2-dimensional polyhedron in RDF^3 defined as the convex hull of 3
# vertices (use the .plot() method to plot)`

a.plot(fill='green') + b.plot(fill='red') + c.plot(fill='orange')

Unexpected intersection between parallel polygons.

The intersection function returns a non-empty intersection for two polygons that are separated in space.

The following is a reproducible example:

# Define parallel polygons.
a = Polyhedron([[0, -1, 1], [1, -1, 1], [1, 1, -1]])
b = Polyhedron([[0.0, -0.5, 1.5], [1.0, -0.5, 1.5], [1.0, 1.5, -0.5]])

# Intersection.
c = a.intersection(b)

# c -> 
# `A 2-dimensional polyhedron in RDF^3 defined as the convex hull of 3
# vertices (use the .plot() method to plot)`

a.plot(fill='green') + b.plot(fill='red') + c.plot(fill='orange')

Unexpected intersection between parallel polygons.

The intersection function returns a non-empty intersection for two polygons that are separated in space.

The following is a reproducible example:

# Define parallel polygons.
a = Polyhedron([[0, -1, 1], [1, -1, 1], [1, 1, -1]])
b = Polyhedron([[0.0, -0.5, 1.5], [1.0, -0.5, 1.5], [1.0, 1.5, -0.5]])

# Intersection.
c = a.intersection(b)

# c -> 
# `A 2-dimensional polyhedron in RDF^3 defined as the convex hull of 3
# vertices (use the .plot() method to plot)`

a.plot(fill='green') + b.plot(fill='red') + c.plot(fill='orange')