Nearly equally spaced 3D-meshLong running ToElementMesh with very “large” domainsHow to create a surface mesh embedded in 3D?How do you refine the elements of a 3D mesh?Is there a way to make MaxCellMeasure and MaxBoundaryCellMeasure comparable?Making good meshesComputing volume from node coordinates on the surface of a non-convex solidMeshing control of NDEigensystem

Gap in tcolorbox after title

Chandrayaan 2: Why is Vikram Lander's life limited to 14 Days?

Features seen on the Space Shuttle's solid booster; what does "LOADED" mean exactly?

Why does low tire pressure decrease fuel economy?

Is it unavoidable taking shortcuts in software development sometimes?

Isn't that (two voices leaping to C like this) a breaking of the rules of four-part harmony?

How to set any file manager in Linux to show the duration like the Length feature in Windows Explorer?

Bit floating sequence

Why do the British opposition parties not want a new election?

Train between Vienna airport and city center

The pirate treasure of Leatherback Atoll

What's the biggest difference between these two photos?

How do I reference a custom counter that shows the section number?

What is the difference between a translation and a Galilean transformation?

Tikzcd in beamer not working

Yet another calculator problem

When calculating averages, why can we treat exploding die as if they're independent?

Does the 2019 UA artificer need to prepare the Lesser Restoration spell to cast it with their Alchemical Mastery feature?

Why would an airport be depicted with symbology for runways longer than 8,069 feet even though it is reported on the sectional as 7,200 feet?

Milankovitch Cycle induced climate change

Supervisor wants me to support a diploma-thesis software tool after I graduated

Algorithm to count the number of subsets of size k with sum of all its elements minimum possible

Is there a specific way to describe over-grown, old, tough vegetables?

Are personality traits, ideals, bonds, and flaws required?



Nearly equally spaced 3D-mesh


Long running ToElementMesh with very “large” domainsHow to create a surface mesh embedded in 3D?How do you refine the elements of a 3D mesh?Is there a way to make MaxCellMeasure and MaxBoundaryCellMeasure comparable?Making good meshesComputing volume from node coordinates on the surface of a non-convex solidMeshing control of NDEigensystem






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2












$begingroup$


How to mesh a volume (3D region) with nearly equaly spaced vertices?



Example: Disk with radius 50 and height 15



disk = ImplicitRegion[0 < x^2 + y^2 < 50^2 && 0 < z < 15, x, y, z];


Is there an easy way to mesh the volume such that the vertices are constrained to around 5?



I tried



ToElementMesh[disk, MaxCellMeasure -> 1 ->100]["Wireframe"]


enter image description here



which only gives a nonuniform mesh



Thanks!










share|improve this question











$endgroup$













  • $begingroup$
    You can mesh with tetrahedra. Each tetraheada has 4 vertices. Do you just want a total of 5 vertices so that the disk is very poorly meshed?
    $endgroup$
    – Hugh
    12 hours ago










  • $begingroup$
    @Hugh Yes , 3 or 4 elements along the thickness direction would be ok.
    $endgroup$
    – Ulrich Neumann
    12 hours ago

















2












$begingroup$


How to mesh a volume (3D region) with nearly equaly spaced vertices?



Example: Disk with radius 50 and height 15



disk = ImplicitRegion[0 < x^2 + y^2 < 50^2 && 0 < z < 15, x, y, z];


Is there an easy way to mesh the volume such that the vertices are constrained to around 5?



I tried



ToElementMesh[disk, MaxCellMeasure -> 1 ->100]["Wireframe"]


enter image description here



which only gives a nonuniform mesh



Thanks!










share|improve this question











$endgroup$













  • $begingroup$
    You can mesh with tetrahedra. Each tetraheada has 4 vertices. Do you just want a total of 5 vertices so that the disk is very poorly meshed?
    $endgroup$
    – Hugh
    12 hours ago










  • $begingroup$
    @Hugh Yes , 3 or 4 elements along the thickness direction would be ok.
    $endgroup$
    – Ulrich Neumann
    12 hours ago













2












2








2


1



$begingroup$


How to mesh a volume (3D region) with nearly equaly spaced vertices?



Example: Disk with radius 50 and height 15



disk = ImplicitRegion[0 < x^2 + y^2 < 50^2 && 0 < z < 15, x, y, z];


Is there an easy way to mesh the volume such that the vertices are constrained to around 5?



I tried



ToElementMesh[disk, MaxCellMeasure -> 1 ->100]["Wireframe"]


enter image description here



which only gives a nonuniform mesh



Thanks!










share|improve this question











$endgroup$




How to mesh a volume (3D region) with nearly equaly spaced vertices?



Example: Disk with radius 50 and height 15



disk = ImplicitRegion[0 < x^2 + y^2 < 50^2 && 0 < z < 15, x, y, z];


Is there an easy way to mesh the volume such that the vertices are constrained to around 5?



I tried



ToElementMesh[disk, MaxCellMeasure -> 1 ->100]["Wireframe"]


enter image description here



which only gives a nonuniform mesh



Thanks!







mesh meshfunction






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 12 hours ago







Ulrich Neumann

















asked 12 hours ago









Ulrich NeumannUlrich Neumann

14.1k7 silver badges23 bronze badges




14.1k7 silver badges23 bronze badges














  • $begingroup$
    You can mesh with tetrahedra. Each tetraheada has 4 vertices. Do you just want a total of 5 vertices so that the disk is very poorly meshed?
    $endgroup$
    – Hugh
    12 hours ago










  • $begingroup$
    @Hugh Yes , 3 or 4 elements along the thickness direction would be ok.
    $endgroup$
    – Ulrich Neumann
    12 hours ago
















  • $begingroup$
    You can mesh with tetrahedra. Each tetraheada has 4 vertices. Do you just want a total of 5 vertices so that the disk is very poorly meshed?
    $endgroup$
    – Hugh
    12 hours ago










  • $begingroup$
    @Hugh Yes , 3 or 4 elements along the thickness direction would be ok.
    $endgroup$
    – Ulrich Neumann
    12 hours ago















$begingroup$
You can mesh with tetrahedra. Each tetraheada has 4 vertices. Do you just want a total of 5 vertices so that the disk is very poorly meshed?
$endgroup$
– Hugh
12 hours ago




$begingroup$
You can mesh with tetrahedra. Each tetraheada has 4 vertices. Do you just want a total of 5 vertices so that the disk is very poorly meshed?
$endgroup$
– Hugh
12 hours ago












$begingroup$
@Hugh Yes , 3 or 4 elements along the thickness direction would be ok.
$endgroup$
– Ulrich Neumann
12 hours ago




$begingroup$
@Hugh Yes , 3 or 4 elements along the thickness direction would be ok.
$endgroup$
– Ulrich Neumann
12 hours ago










2 Answers
2






active

oldest

votes


















2














$begingroup$

Here is a possible way forward. I think the standard meshing algorithm attempt to give you a good circular boundary and then this dictates a general mesh size which is too fine for your purposes. Here I define my own boundary points and then mesh from there. I have your five vertices across the disk thickness and put a similar spacing around the circumference.



 Needs["NDSolve`FEM`"]
h = 15; (* height *)
r = 50; (* radius *)
nn = 79; (* number of edges *)
pts = Partition[Flatten[Table[
Table[r Cos[2 π k/nn], r Sin[2 π k/nn], z, k, 0,
nn - 1],
z, 0, h, h/4]], 3];
Graphics3D[
Point[pts]


]


Mathematica graphics



Now I make the boundary mesh which is not fine.



m = DelaunayMesh[pts];
bmesh = ToBoundaryMesh[m];
bmesh["Wireframe"]


Mathematica graphics



Now the mesh density seems to follow from the boundary



mesh = ToElementMesh[bmesh];
mesh["Wireframe"]


Mathematica graphics



I don't know how to best check the mesh size within the boundaries. Perhaps someone can suggest a method. Here is a section showing the nodes. There are mid side nodes on each tetrahedra but I think I have your 5 vertices across the thickness.



cc = mesh["Coordinates"];
Show[
Graphics3D[Point[cc], PlotRange -> All, 0, 10, All],
mesh["Wireframe"]
]


Mathematica graphics



Also we can look at the mesh quality



Histogram[mesh["Quality"]]


Mathematica graphics



The histogram suggests that there is a dominant size around 0.8. I am not sure of the units here. Is the horizontal axis the volume of elements?



Does this help?






share|improve this answer











$endgroup$






















    2














    $begingroup$

    Coarse cylinder



    Using the Cylinder primitive seems to do the trick:



    MeshRegion[
    DiscretizeRegion[Cylinder[0, 0, 0, 0, 0, 15, 50], MaxCellMeasure -> 1 -> 100],
    PlotTheme -> "Lines",
    MeshCellStyle -> 1 -> Black
    ]




    General region



    Notice that the boundary is being discretized finer than you'd like. It looks like if we can workaround this, we could get a coarse mesh with higher quality elements.



    One way is through stricter sampling options:



    cyl = ImplicitRegion[0 < x^2 + y^2 < 50^2 && 0 < z < 15, x, y, z];
    mr = DiscretizeRegion[cyl,
    MaxCellMeasure -> 1 -> 100, 3 -> 200,
    Method -> "RegionPlot3D", PlotPoints -> 6
    ];

    MeshCellCount[mr]



    386, 1990, 2902, 1297



    MeshRegion[mr, PlotTheme -> "Lines", MeshCellStyle -> 1 -> Black]




    Histogram[PropertyValue[mr, 3, MeshCellQuality]]





    Here's another example:



    ball = ImplicitRegion[x^2 + y^2 + z^2 <= 50^2, x, y, z];

    mr1 = DiscretizeRegion[ball, MaxCellMeasure -> 1 -> 100];
    mr2 = DiscretizeRegion[ball, MaxCellMeasure -> 1 -> 100, 3 -> 200,
    Method -> "RegionPlot3D", PlotPoints -> 6];

    MeshRegion[mr1, PlotTheme -> "Lines", MeshCellStyle -> 1 -> Black]
    MeshRegion[mr2, PlotTheme -> "Lines", MeshCellStyle -> 1 -> Black]


    enter image description here



    Histogram[PropertyValue[mr1, 3, MeshCellQuality]]
    Histogram[PropertyValue[mr2, 3, MeshCellQuality]]


    enter image description here






    share|improve this answer









    $endgroup$

















      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "387"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );














      draft saved

      draft discarded
















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f204967%2fnearly-equally-spaced-3d-mesh%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      2














      $begingroup$

      Here is a possible way forward. I think the standard meshing algorithm attempt to give you a good circular boundary and then this dictates a general mesh size which is too fine for your purposes. Here I define my own boundary points and then mesh from there. I have your five vertices across the disk thickness and put a similar spacing around the circumference.



       Needs["NDSolve`FEM`"]
      h = 15; (* height *)
      r = 50; (* radius *)
      nn = 79; (* number of edges *)
      pts = Partition[Flatten[Table[
      Table[r Cos[2 π k/nn], r Sin[2 π k/nn], z, k, 0,
      nn - 1],
      z, 0, h, h/4]], 3];
      Graphics3D[
      Point[pts]


      ]


      Mathematica graphics



      Now I make the boundary mesh which is not fine.



      m = DelaunayMesh[pts];
      bmesh = ToBoundaryMesh[m];
      bmesh["Wireframe"]


      Mathematica graphics



      Now the mesh density seems to follow from the boundary



      mesh = ToElementMesh[bmesh];
      mesh["Wireframe"]


      Mathematica graphics



      I don't know how to best check the mesh size within the boundaries. Perhaps someone can suggest a method. Here is a section showing the nodes. There are mid side nodes on each tetrahedra but I think I have your 5 vertices across the thickness.



      cc = mesh["Coordinates"];
      Show[
      Graphics3D[Point[cc], PlotRange -> All, 0, 10, All],
      mesh["Wireframe"]
      ]


      Mathematica graphics



      Also we can look at the mesh quality



      Histogram[mesh["Quality"]]


      Mathematica graphics



      The histogram suggests that there is a dominant size around 0.8. I am not sure of the units here. Is the horizontal axis the volume of elements?



      Does this help?






      share|improve this answer











      $endgroup$



















        2














        $begingroup$

        Here is a possible way forward. I think the standard meshing algorithm attempt to give you a good circular boundary and then this dictates a general mesh size which is too fine for your purposes. Here I define my own boundary points and then mesh from there. I have your five vertices across the disk thickness and put a similar spacing around the circumference.



         Needs["NDSolve`FEM`"]
        h = 15; (* height *)
        r = 50; (* radius *)
        nn = 79; (* number of edges *)
        pts = Partition[Flatten[Table[
        Table[r Cos[2 π k/nn], r Sin[2 π k/nn], z, k, 0,
        nn - 1],
        z, 0, h, h/4]], 3];
        Graphics3D[
        Point[pts]


        ]


        Mathematica graphics



        Now I make the boundary mesh which is not fine.



        m = DelaunayMesh[pts];
        bmesh = ToBoundaryMesh[m];
        bmesh["Wireframe"]


        Mathematica graphics



        Now the mesh density seems to follow from the boundary



        mesh = ToElementMesh[bmesh];
        mesh["Wireframe"]


        Mathematica graphics



        I don't know how to best check the mesh size within the boundaries. Perhaps someone can suggest a method. Here is a section showing the nodes. There are mid side nodes on each tetrahedra but I think I have your 5 vertices across the thickness.



        cc = mesh["Coordinates"];
        Show[
        Graphics3D[Point[cc], PlotRange -> All, 0, 10, All],
        mesh["Wireframe"]
        ]


        Mathematica graphics



        Also we can look at the mesh quality



        Histogram[mesh["Quality"]]


        Mathematica graphics



        The histogram suggests that there is a dominant size around 0.8. I am not sure of the units here. Is the horizontal axis the volume of elements?



        Does this help?






        share|improve this answer











        $endgroup$

















          2














          2










          2







          $begingroup$

          Here is a possible way forward. I think the standard meshing algorithm attempt to give you a good circular boundary and then this dictates a general mesh size which is too fine for your purposes. Here I define my own boundary points and then mesh from there. I have your five vertices across the disk thickness and put a similar spacing around the circumference.



           Needs["NDSolve`FEM`"]
          h = 15; (* height *)
          r = 50; (* radius *)
          nn = 79; (* number of edges *)
          pts = Partition[Flatten[Table[
          Table[r Cos[2 π k/nn], r Sin[2 π k/nn], z, k, 0,
          nn - 1],
          z, 0, h, h/4]], 3];
          Graphics3D[
          Point[pts]


          ]


          Mathematica graphics



          Now I make the boundary mesh which is not fine.



          m = DelaunayMesh[pts];
          bmesh = ToBoundaryMesh[m];
          bmesh["Wireframe"]


          Mathematica graphics



          Now the mesh density seems to follow from the boundary



          mesh = ToElementMesh[bmesh];
          mesh["Wireframe"]


          Mathematica graphics



          I don't know how to best check the mesh size within the boundaries. Perhaps someone can suggest a method. Here is a section showing the nodes. There are mid side nodes on each tetrahedra but I think I have your 5 vertices across the thickness.



          cc = mesh["Coordinates"];
          Show[
          Graphics3D[Point[cc], PlotRange -> All, 0, 10, All],
          mesh["Wireframe"]
          ]


          Mathematica graphics



          Also we can look at the mesh quality



          Histogram[mesh["Quality"]]


          Mathematica graphics



          The histogram suggests that there is a dominant size around 0.8. I am not sure of the units here. Is the horizontal axis the volume of elements?



          Does this help?






          share|improve this answer











          $endgroup$



          Here is a possible way forward. I think the standard meshing algorithm attempt to give you a good circular boundary and then this dictates a general mesh size which is too fine for your purposes. Here I define my own boundary points and then mesh from there. I have your five vertices across the disk thickness and put a similar spacing around the circumference.



           Needs["NDSolve`FEM`"]
          h = 15; (* height *)
          r = 50; (* radius *)
          nn = 79; (* number of edges *)
          pts = Partition[Flatten[Table[
          Table[r Cos[2 π k/nn], r Sin[2 π k/nn], z, k, 0,
          nn - 1],
          z, 0, h, h/4]], 3];
          Graphics3D[
          Point[pts]


          ]


          Mathematica graphics



          Now I make the boundary mesh which is not fine.



          m = DelaunayMesh[pts];
          bmesh = ToBoundaryMesh[m];
          bmesh["Wireframe"]


          Mathematica graphics



          Now the mesh density seems to follow from the boundary



          mesh = ToElementMesh[bmesh];
          mesh["Wireframe"]


          Mathematica graphics



          I don't know how to best check the mesh size within the boundaries. Perhaps someone can suggest a method. Here is a section showing the nodes. There are mid side nodes on each tetrahedra but I think I have your 5 vertices across the thickness.



          cc = mesh["Coordinates"];
          Show[
          Graphics3D[Point[cc], PlotRange -> All, 0, 10, All],
          mesh["Wireframe"]
          ]


          Mathematica graphics



          Also we can look at the mesh quality



          Histogram[mesh["Quality"]]


          Mathematica graphics



          The histogram suggests that there is a dominant size around 0.8. I am not sure of the units here. Is the horizontal axis the volume of elements?



          Does this help?







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 8 hours ago

























          answered 8 hours ago









          HughHugh

          7,3562 gold badges19 silver badges47 bronze badges




          7,3562 gold badges19 silver badges47 bronze badges


























              2














              $begingroup$

              Coarse cylinder



              Using the Cylinder primitive seems to do the trick:



              MeshRegion[
              DiscretizeRegion[Cylinder[0, 0, 0, 0, 0, 15, 50], MaxCellMeasure -> 1 -> 100],
              PlotTheme -> "Lines",
              MeshCellStyle -> 1 -> Black
              ]




              General region



              Notice that the boundary is being discretized finer than you'd like. It looks like if we can workaround this, we could get a coarse mesh with higher quality elements.



              One way is through stricter sampling options:



              cyl = ImplicitRegion[0 < x^2 + y^2 < 50^2 && 0 < z < 15, x, y, z];
              mr = DiscretizeRegion[cyl,
              MaxCellMeasure -> 1 -> 100, 3 -> 200,
              Method -> "RegionPlot3D", PlotPoints -> 6
              ];

              MeshCellCount[mr]



              386, 1990, 2902, 1297



              MeshRegion[mr, PlotTheme -> "Lines", MeshCellStyle -> 1 -> Black]




              Histogram[PropertyValue[mr, 3, MeshCellQuality]]





              Here's another example:



              ball = ImplicitRegion[x^2 + y^2 + z^2 <= 50^2, x, y, z];

              mr1 = DiscretizeRegion[ball, MaxCellMeasure -> 1 -> 100];
              mr2 = DiscretizeRegion[ball, MaxCellMeasure -> 1 -> 100, 3 -> 200,
              Method -> "RegionPlot3D", PlotPoints -> 6];

              MeshRegion[mr1, PlotTheme -> "Lines", MeshCellStyle -> 1 -> Black]
              MeshRegion[mr2, PlotTheme -> "Lines", MeshCellStyle -> 1 -> Black]


              enter image description here



              Histogram[PropertyValue[mr1, 3, MeshCellQuality]]
              Histogram[PropertyValue[mr2, 3, MeshCellQuality]]


              enter image description here






              share|improve this answer









              $endgroup$



















                2














                $begingroup$

                Coarse cylinder



                Using the Cylinder primitive seems to do the trick:



                MeshRegion[
                DiscretizeRegion[Cylinder[0, 0, 0, 0, 0, 15, 50], MaxCellMeasure -> 1 -> 100],
                PlotTheme -> "Lines",
                MeshCellStyle -> 1 -> Black
                ]




                General region



                Notice that the boundary is being discretized finer than you'd like. It looks like if we can workaround this, we could get a coarse mesh with higher quality elements.



                One way is through stricter sampling options:



                cyl = ImplicitRegion[0 < x^2 + y^2 < 50^2 && 0 < z < 15, x, y, z];
                mr = DiscretizeRegion[cyl,
                MaxCellMeasure -> 1 -> 100, 3 -> 200,
                Method -> "RegionPlot3D", PlotPoints -> 6
                ];

                MeshCellCount[mr]



                386, 1990, 2902, 1297



                MeshRegion[mr, PlotTheme -> "Lines", MeshCellStyle -> 1 -> Black]




                Histogram[PropertyValue[mr, 3, MeshCellQuality]]





                Here's another example:



                ball = ImplicitRegion[x^2 + y^2 + z^2 <= 50^2, x, y, z];

                mr1 = DiscretizeRegion[ball, MaxCellMeasure -> 1 -> 100];
                mr2 = DiscretizeRegion[ball, MaxCellMeasure -> 1 -> 100, 3 -> 200,
                Method -> "RegionPlot3D", PlotPoints -> 6];

                MeshRegion[mr1, PlotTheme -> "Lines", MeshCellStyle -> 1 -> Black]
                MeshRegion[mr2, PlotTheme -> "Lines", MeshCellStyle -> 1 -> Black]


                enter image description here



                Histogram[PropertyValue[mr1, 3, MeshCellQuality]]
                Histogram[PropertyValue[mr2, 3, MeshCellQuality]]


                enter image description here






                share|improve this answer









                $endgroup$

















                  2














                  2










                  2







                  $begingroup$

                  Coarse cylinder



                  Using the Cylinder primitive seems to do the trick:



                  MeshRegion[
                  DiscretizeRegion[Cylinder[0, 0, 0, 0, 0, 15, 50], MaxCellMeasure -> 1 -> 100],
                  PlotTheme -> "Lines",
                  MeshCellStyle -> 1 -> Black
                  ]




                  General region



                  Notice that the boundary is being discretized finer than you'd like. It looks like if we can workaround this, we could get a coarse mesh with higher quality elements.



                  One way is through stricter sampling options:



                  cyl = ImplicitRegion[0 < x^2 + y^2 < 50^2 && 0 < z < 15, x, y, z];
                  mr = DiscretizeRegion[cyl,
                  MaxCellMeasure -> 1 -> 100, 3 -> 200,
                  Method -> "RegionPlot3D", PlotPoints -> 6
                  ];

                  MeshCellCount[mr]



                  386, 1990, 2902, 1297



                  MeshRegion[mr, PlotTheme -> "Lines", MeshCellStyle -> 1 -> Black]




                  Histogram[PropertyValue[mr, 3, MeshCellQuality]]





                  Here's another example:



                  ball = ImplicitRegion[x^2 + y^2 + z^2 <= 50^2, x, y, z];

                  mr1 = DiscretizeRegion[ball, MaxCellMeasure -> 1 -> 100];
                  mr2 = DiscretizeRegion[ball, MaxCellMeasure -> 1 -> 100, 3 -> 200,
                  Method -> "RegionPlot3D", PlotPoints -> 6];

                  MeshRegion[mr1, PlotTheme -> "Lines", MeshCellStyle -> 1 -> Black]
                  MeshRegion[mr2, PlotTheme -> "Lines", MeshCellStyle -> 1 -> Black]


                  enter image description here



                  Histogram[PropertyValue[mr1, 3, MeshCellQuality]]
                  Histogram[PropertyValue[mr2, 3, MeshCellQuality]]


                  enter image description here






                  share|improve this answer









                  $endgroup$



                  Coarse cylinder



                  Using the Cylinder primitive seems to do the trick:



                  MeshRegion[
                  DiscretizeRegion[Cylinder[0, 0, 0, 0, 0, 15, 50], MaxCellMeasure -> 1 -> 100],
                  PlotTheme -> "Lines",
                  MeshCellStyle -> 1 -> Black
                  ]




                  General region



                  Notice that the boundary is being discretized finer than you'd like. It looks like if we can workaround this, we could get a coarse mesh with higher quality elements.



                  One way is through stricter sampling options:



                  cyl = ImplicitRegion[0 < x^2 + y^2 < 50^2 && 0 < z < 15, x, y, z];
                  mr = DiscretizeRegion[cyl,
                  MaxCellMeasure -> 1 -> 100, 3 -> 200,
                  Method -> "RegionPlot3D", PlotPoints -> 6
                  ];

                  MeshCellCount[mr]



                  386, 1990, 2902, 1297



                  MeshRegion[mr, PlotTheme -> "Lines", MeshCellStyle -> 1 -> Black]




                  Histogram[PropertyValue[mr, 3, MeshCellQuality]]





                  Here's another example:



                  ball = ImplicitRegion[x^2 + y^2 + z^2 <= 50^2, x, y, z];

                  mr1 = DiscretizeRegion[ball, MaxCellMeasure -> 1 -> 100];
                  mr2 = DiscretizeRegion[ball, MaxCellMeasure -> 1 -> 100, 3 -> 200,
                  Method -> "RegionPlot3D", PlotPoints -> 6];

                  MeshRegion[mr1, PlotTheme -> "Lines", MeshCellStyle -> 1 -> Black]
                  MeshRegion[mr2, PlotTheme -> "Lines", MeshCellStyle -> 1 -> Black]


                  enter image description here



                  Histogram[PropertyValue[mr1, 3, MeshCellQuality]]
                  Histogram[PropertyValue[mr2, 3, MeshCellQuality]]


                  enter image description here







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 51 mins ago









                  Chip HurstChip Hurst

                  25.4k1 gold badge61 silver badges100 bronze badges




                  25.4k1 gold badge61 silver badges100 bronze badges































                      draft saved

                      draft discarded















































                      Thanks for contributing an answer to Mathematica Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      Use MathJax to format equations. MathJax reference.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f204967%2fnearly-equally-spaced-3d-mesh%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                      Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                      199年 目錄 大件事 到箇年出世嗰人 到箇年死嗰人 節慶、風俗習慣 導覽選單