I´m trying with
alfa = 0.75
p = {{1, 0, 0}, {alfa, 0, 1 - alfa}, {alfa, 1 - alfa, 0}, {0, alfa,
1 - alfa}, {0, 1 - alfa, alfa}}
chull = ConvexHullMesh[p];
Show[HighlightMesh[chull, Labeled[1, "Index"]],
Graphics3D[{Red, Sphere[p, 0.05]}], Axes -> True, Boxed -> True,
AxesLabel -> {x, y, z}]
but only create the convexhull of the first 4 points.
I don´t know what´s the problem to create the convexhull with the last.
Answer
If you generate random points using p = RandomReal[{-1, 1}, {5, 3}]
then your code works fine -- suggesting that the problem has to do with the fact that all your points lie in a plane. A simple solution is to perturb one of the points slightly outside the plane:
alfa = 0.75;
p = {{1,0,0}, {alfa,0,1-alfa}, {alfa,1-alfa,0}, {0,alfa,1-alfa}, {0,1-alfa,alfa+0.0000001}};
chull = ConvexHullMesh[p];
Show[HighlightMesh[chull, Labeled[1, "Index"]],
Graphics3D[{Red, Sphere[p, 0.05]}], Axes -> True, Boxed -> True, AxesLabel -> {x, y, z}]
Comments
Post a Comment