Message Boards Message Boards

GROUPS:

ConvexHullMesh, setting the options.

Posted 4 years ago
4477 Views
|
2 Replies
|
0 Total Likes
|

Hi,

I am using ConvexHullMesh, but have problems setting the right options.

pts = {{3.`, 0.95`, 10.07`}, {3.`, -0.61`, 11.63`}, {-1.97`, 0.95`, 
    15.04`}, {-1.97`, -0.61`, 16.6`}, {6.68`, -0.13`, 
    11.15`}, {6.2`, -0.61`, 11.63`}, {-0.99`, -0.13`, 
    18.82`}, {-1.47`, -0.61`, 19.3`}, {5.55`, 3.5`, 7.52`}, {6.68`, 
    3.5`, 7.52`}, {-0.99`, 4.63`, 14.06`}, {-1.97`, 3.65`, 
    15.04`}, {-1.97`, -0.61`, 19.3`}, {5.55`, 4.63`, 7.52`}};

CH = ConvexHullMesh[pts, Axes -> True, 
  Ticks -> {{-5, 0, 5}, {-5, 0, 5}, {0, 10, 20}}, Boxed -> True, 
  AxesLabel -> {y1, y2, y3}, PlotTheme -> "Scientific"]

This does give me a convexhullmesh, as it should. However, I do not know how to:

  • change the axis range, such that they include all the ticks that I stated. For instance, right now y3 does not include 0. Another way to say this: I want the box to be larger. Right now it seems like Mathematica seeks to make the box as small as possible.

  • make sure that the three axis have the same steps (i.e. the length of 1 unit is the same on all three axes).

  • change opacity to 0.5

  • change the color to, say, yellow

In the next step I will use Show to illustrate CH and some points and lines in 3D, so the specified options should remain when I will use CH later in Show.

Thank you very much for your time and consideration!

2 Replies

Have you looked at the options for ConvexHullMesh in docs? It does have MeshCellHighlight and MeshCellStyle - and you can look up those in docs too and related functions. Please look too at the rest of options I list below and read carefully examples in docs on them, this will help you a lot in future.

ConvexHullMesh[pts, Axes -> True, FrameTicks -> {{-5, 0, 5}, {-5, 0, 5}, {0, 10, 20}}, 
 Boxed -> True, AxesLabel -> {y1, y2, y3}, PlotTheme -> "Scientific", MeshCellStyle -> 
{{2, All} -> Opacity[0.5, Yellow]}, PlotRangePadding -> 1, SphericalRegion -> True]

enter image description here

Posted 4 years ago

Thank you so much for your answer, Vitaliy. I did read the examples, but unfortunately could not find a way of solving all the problems in one line. For instance, I did not know about the option PlotRangePadding. So, I solved the problem by first drawing invisible points in a 3d diagram (to set the axes) and then using Show where I first ask to show these points, and then the convexhullmesh. Once again, thank you!

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract