10
$\begingroup$

Bug introduced in 10.2 and persisting through 11.1


Update:

It turns out after some testing, none of the Options work in DelaunayMesh when 3D point sets are involved.

Original

In Mathematica 10.2 the new Option MeshCellHighlight and updated Option MeshCellStyle does not seem to work when used in DelaunayMesh of 3D point sets. For example, the following does nothing.

pts = RandomReal[5, {40, 3}];
del = DelaunayMesh[pts, MeshCellHighlight -> {{2, All} -> Yellow}]

Mathematica graphics

But for 2D point sets we get the expected result:

pts2d = RandomReal[5, {40, 2}];
del2d = DelaunayMesh[pts2d, MeshCellHighlight -> {{2, All} -> Yellow, {1, All} -> 
                      Directive[Thick, Dashed, Red]}]

Mathematica graphics

Also it works with ConvexHullMesh:

ConvexHullMesh[pts, MeshCellHighlight -> {{2, All} -> Yellow}]

Mathematica graphics

From the documentation of DelaunayMesh:

DelaunayMesh takes the same options as MeshRegion.

So we can do

MeshRegion[del, MeshCellStyle -> {{2, All} -> Yellow}]

Mathematica graphics

Of course, one can just use HighlightMesh afterwards on del to achieve the desired result. I have tried this on both Windows and Linux. Can anyone confirm these results?

$\endgroup$
  • 3
    $\begingroup$ Reported internally as a bug. Thank you! $\endgroup$ – ilian Jul 17 '15 at 15:49
  • $\begingroup$ @ilian. Thanks for reporting it. $\endgroup$ – RunnyKine Jul 17 '15 at 16:43

Your Answer

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

Browse other questions tagged or ask your own question.