4
$\begingroup$

Consider the following:

pts = {{0, 1}, {1, Infinity}, {2, Infinity}, {3, Infinity}, {4, Infinity}, {5, Infinity}, {6, Infinity}, {7, 0}}

Now,

foo = ConvexHullMesh[pts]

InputForm[foo]

BoundaryMeshRegion[{{0., 1.}, {1., 0.}, {2., 0.}, {3., 0.}, {4., 0.}, 
{5., 0.}, {6., 
 0.}, {7., 0.}}, {Line[{{1, 2}, {2, 3}, {3, 4}, {4, 5}, {5, 6}, {6, 7}, 
{7, 8}, {8, 
   1}}]}, Method -> {"SeparateBoundaries" -> False}]

How did infinities become zeros?

$\endgroup$
  • 4
    $\begingroup$ I filed this as a bug. FWIW, NDSolveFEMToElementMesh[pts] returns unevaluated. $\endgroup$ – user21 Jul 3 '17 at 13:39
4
$\begingroup$

ConvexHullMesh uses TetGen to compute the convex hull. TetGen is an external library and can only perform computations with floating-point numbers. Hence, the wrapper for TetGen on the Mathematica side has two options: Either replacing nonnumeric data such as the symbolic Infinity by anything else (e.g. by 0. as it was done here); or issueing an error (what I would prefer). As the name of the command suggests, the return value of ConvexHullMesh should be a mesh (a MeshRegion). So your desired return value cannot be represented by this data type.

| improve this answer | |
$\endgroup$
  • 3
    $\begingroup$ It is completely clear that an error message is better than a wrong answer.... $\endgroup$ – Igor Rivin Jul 3 '17 at 13:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.