问题
I have 2 polyhedra generated by the following extreme points:
df1 = structure(c(3, 5, 8, 6), .Dim = c(2L, 2L))
df2 = structure(c(2, 4, 9, 7), .Dim = c(2L, 2L))
Those points, taken as constraint inequalities, create a space. I would like to select the hull formed by the intersection of those 2 polyhedra.
The use of the function intersectn()
from the geometry
package, but I get the following error.
Error in convhulln(ps1, "n FA") :
Received error code 1 from qhull. Qhull error:
QH6214 qhull input error: not enough points(2) to construct initial simplex (need 3)
While executing: | qhull n FA Qt
Options selected for Qhull 2015.2.r 2016/01/18:
run-id 2112210196 normals FArea-total Qtriangulate _pre-merge
_zero-centrum
Any idea why I am getting this error? The following example works.
ps1 <- rbox(0, C=0.5)
ps2 <- rbox(0, C=0.5) + 0.5
out <- intersectn(ps1, ps2)
来源:https://stackoverflow.com/questions/59336288/intersection-of-2-polyhedra-using-intersectn-r