1
$\begingroup$

I am using this code to find convex Hull I need to show the coordinates above the points like this example: Labeling x,y,z coordinates in ListPointPlot3D

my code is:

ClearAll["Global`*"]

M = x y z + x^4 + x^2 z^2 + z^4 + y^4

p = CoefficientRules[M][[All, 1]]

{{4, 0, 0}, {2, 0, 2}, {1, 1, 1}, {0, 4, 0}, {0, 0, 4}}

chull = ConvexHullMesh[p];
Show[HighlightMesh[chull, Labeled[1, "Index"]], 
 Graphics3D[{Red, Sphere[p, 0.05]}], Axes -> True, Boxed -> True, 
 AxesLabel -> {x, y, z}]

Thank you

$\endgroup$

1 Answer 1

1
$\begingroup$

You can use Text with Graphics3D

Show[HighlightMesh[chull, Labeled[1, "Index"]], 
     Graphics3D[{Red, Sphere[p, 0.05], Blue, 
     Map[Text[#, # + {0., 0, 0.1}] &, p]}]
  , Axes -> True, Boxed -> True, AxesLabel -> {x, y, z}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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