Tweeted twitter.com/StackMma/status/1089901213745848320
4 edited tags
| link

How to takeextract something from DelaunayMesh and similar family of functions

3 replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
source | link

I was looking at this question herehere and I tried the suggested idea by Anton Antonov to use DelaunayMesh

It will look like this:

points = {{0, 0, 1}, {5, 0, 0}, {1, 3, 0}, {0, 0, 2}, {4, 3, 0}, 
               {5, 0, 2}, {1, 3, 2}, {4, 3, 2}};
r=DelaunayMesh[points]

enter image description here

I tried to take something from r and I realised that r is an Atomic expression and I can not take anything from it similar to what we do with Graphics

Looking at the FullForm of r we can see: enter image description here

How to take something from this (other than copy paste) similar to what we used to do with Graphics

Note that these methods do not work:

Cases[r, Tetrahedron[x_] :> x, -1]
Cases[r, MeshRegion[x_, __] :> x]

Same thing with other functions like BoundaryMeshRegion, MeshRegion, DiscretizeRegion,Graph and so on

Thank you

I was looking at this question here and I tried the suggested idea by Anton Antonov to use DelaunayMesh

It will look like this:

points = {{0, 0, 1}, {5, 0, 0}, {1, 3, 0}, {0, 0, 2}, {4, 3, 0}, 
               {5, 0, 2}, {1, 3, 2}, {4, 3, 2}};
r=DelaunayMesh[points]

enter image description here

I tried to take something from r and I realised that r is an Atomic expression and I can not take anything from it similar to what we do with Graphics

Looking at the FullForm of r we can see: enter image description here

How to take something from this (other than copy paste) similar to what we used to do with Graphics

Note that these methods do not work:

Cases[r, Tetrahedron[x_] :> x, -1]
Cases[r, MeshRegion[x_, __] :> x]

Same thing with other functions like BoundaryMeshRegion, MeshRegion, DiscretizeRegion,Graph and so on

Thank you

I was looking at this question here and I tried the suggested idea by Anton Antonov to use DelaunayMesh

It will look like this:

points = {{0, 0, 1}, {5, 0, 0}, {1, 3, 0}, {0, 0, 2}, {4, 3, 0}, 
               {5, 0, 2}, {1, 3, 2}, {4, 3, 2}};
r=DelaunayMesh[points]

enter image description here

I tried to take something from r and I realised that r is an Atomic expression and I can not take anything from it similar to what we do with Graphics

Looking at the FullForm of r we can see: enter image description here

How to take something from this (other than copy paste) similar to what we used to do with Graphics

Note that these methods do not work:

Cases[r, Tetrahedron[x_] :> x, -1]
Cases[r, MeshRegion[x_, __] :> x]

Same thing with other functions like BoundaryMeshRegion, MeshRegion, DiscretizeRegion,Graph and so on

Thank you

2 edited tags
| link
1
source | link