1
$\begingroup$

Consider 10 random points as

pts =  RandomReal[{-1, 1}, {10, 3}];

The edges of the polyhedron formed by these points can be visualized as

HighlightMesh[DelaunayMesh[RandomReal[{-1, 1}, {10, 3}]], 
 Style[2, Opacity[0.]]]

However, The edges are thin. I want to change the thickness of the edges and the colors as well.

Edit 1

In my approach and the answer provided by @Szabolcs, all the edges along with some inner planes are visible while I need only the outer edges and no surface or plane.

How can I do this?

Edit 2

I got it.

Show[HighlightMesh[
  ConvexHullMesh[pts], {Style[1, {Black}], 
   Style[2, Opacity[0.]]}]]
$\endgroup$
2
$\begingroup$

For some reason, these options don't work directly in DelaunayMesh in 3D (they do for 2D meshes), but they do work in a MeshRegion applied afterwards.

m = DelaunayMesh[RandomReal[{-1, 1}, {10, 3}]]

MeshRegion[m, 
 MeshCellStyle -> {2 -> None, 
   1 -> Directive[AbsoluteThickness[3], Red]}]

enter image description here

$\endgroup$
  • $\begingroup$ I don't mind how it is done. I am happy with the result. Thanks. $\endgroup$ – Majis Aug 22 '18 at 14:23
  • $\begingroup$ However, I have found two problems with this solution. Firstly, it shows all the edges (which was there in my approach as well) while I need only the outer edges and not the diagonals. Secondly, I find that some of the surfaces formed by these points are still not transparent. $\endgroup$ – Majis Aug 22 '18 at 14:40
  • $\begingroup$ @Majis What are "diagonals"? $\endgroup$ – Szabolcs Aug 22 '18 at 14:49
  • $\begingroup$ @Majis Regarding inner edges, that was not in your question. If I understand what you are sayig then you want the ConvexHullMesh, not the DelaunayMesh. $\endgroup$ – Szabolcs Aug 22 '18 at 14:50
  • $\begingroup$ The diagonals are the edges which do not lie on the surface of the convex hull formed by these points. $\endgroup$ – Majis Aug 22 '18 at 14:51

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.