7
$\begingroup$

I am trying to create an acoustic model domain for a small park that contains an Indian burial mound.

  • The park is laid out using a 3D cartesian coordinate system in units of meters.
  • A Hexahedron encapsulates the park. The ceiling of the Hexahedron is 16 meters (about the height of a 5-story building).
  • The {x, y, z} coordinates of the burial mound are in meters. The burial mound coordinates are imported from am Excel workbook.

My initial approach is to define the hexahedron that represents the volumetric domain that I want to simulate around the burial mound.

I defined the hexahedron as:

hexDomain = Hexahedron[{{0,0,0},  {40,0,0}, {40,35,0},{0,35,0},
                        {0,0,16}, {40,0,16},{40,35,16},{0,35,16}}];

I then import the points with the coordinates from the Excel file with:

moundPoints = Import["C:\\Spreadsheets\\Mound Coordinates.xlsx",
                     {"Data", 1, 2;;82, {5,6,7}}];

ListSurfacePlot3D[moundPoints] of the mound is below:

enter image description here

My goal is to replace floor of the volumetric hexDomain with the burial mound as a solid.

I started by creating a solid region for the burial mound with:

moundRegion = ConvexHullRegion[moundPoints];

As you might expect, a RegionDifference between hexDomain and moundRegion will introduce lines and slices between the convex hull points and the hexahedron.

My question is:

What is the best approach to create the domain that includes the burial mound inside of a five-story hexahedron?

If I add the faces of the hexahedron to the moundPoints, I get a domain with connecting lines that should not exist.

The data from Mound Coordinates.xlsx is below.

moundPoints = {{14.0667, 32.719, 0.}, {12.8476, 32.1037, 0.}, {8.9873, 29.9502, 
  0.}, {5.12698, 28.0018, 0.}, {5.22857, 27.7967, 0.}, {1.57143, 
  25.6431, 0.}, {0.75873, 24.8227, 0.}, {1.87619, 17.9519, 
  0.}, {2.18095, 12.7219, 0.}, {5.0254, 9.54292, 0.}, {8.07302, 
  6.26135, 0.}, {11.7302, 3.28743, 0.}, {16.6063, 5.03076, 
  0.}, {19.5524, 7.90214, 0.}, {23.3111, 10.2608, 0.}, {25.0381, 
  11.0812, 0.}, {23.4127, 10.0557, 0.}, {26.2571, 13.85, 
  0.}, {27.4762, 18.9774, 0.}, {24.327, 23.5921, 0.}, {22.1937, 
  27.0788, 0.}, {18.1302, 29.9502, 0.}, {15.4889, 28.3094, 
  1.}, {11.3238, 27.0788, 1.}, {7.97143, 24.0023, 1.}, {6.65079, 
  18.5672, 1.}, {7.05714, 16.5163, 1.}, {10.1048, 13.0296, 
  1.}, {14.5746, 11.2863, 1.}, {17.6222, 10.7735, 1.}, {21.5841, 
  12.7219, 1.}, {24.0222, 16.6188, 1.}, {24.6317, 18.2596, 
  1.}, {23.6159, 23.0794, 1.}, {20.9746, 26.2584, 1.}, {15.7937, 
  28.0018, 1.}, {13.8635, 26.8737, 2.}, {12.0349, 26.0533, 
  2.}, {9.19048, 22.4641, 2.}, {8.37778, 20.4131, 2.}, {8.47937, 
  17.5418, 2.}, {11.1206, 13.85, 2.}, {13.254, 12.927, 2.}, {16.6063, 
  12.1067, 2.}, {18.7397, 12.2092, 2.}, {20.9746, 13.6449, 
  2.}, {22.9048, 18.157, 2.}, {22.7016, 22.0539, 2.}, {21.4825, 
  24.1049, 2.}, {19.4508, 25.3355, 2.}, {16.5048, 26.2584, 
  2.}, {18.3333, 24.5151, 3.}, {13.9651, 25.6431, 3.}, {12.746, 
  25.0278, 3.}, {11.6286, 24.31, 3.}, {10.1048, 21.3361, 3.}, {9.8, 
  18.3621, 3.}, {12.2381, 14.7729, 3.}, {15.5905, 13.6449, 
  3.}, {19.0444, 13.6449, 3.}, {20.2635, 14.5678, 3.}, {21.4825, 
  17.4392, 3.}, {21.6857, 20.0029, 3.}, {21.4825, 21.2335, 
  3.}, {20.4667, 23.0794, 3.}, {18.2317, 24.31, 3.}, {17.0127, 
  23.4896, 4.}, {15.1841, 24.2074, 4.}, {13.4571, 24.0023, 
  4.}, {11.2222, 19.9004, 4.}, {11.3238, 18.6698, 4.}, {13.9651, 
  15.7984, 4.}, {18.3333, 14.8755, 4.}, {19.2476, 15.901, 
  4.}, {20.0603, 20.1055, 4.}, {18.9429, 22.259, 4.}, {17.1143, 
  18.5672, 4.8}, {16.8095, 17.8494, 4.7}, {16.9111, 17.2341, 
  4.8}, {17.5206, 18.5672, 4.8}, {17.5206, 19.1825, 4.7}}
$\endgroup$
4
  • $\begingroup$ You will probably have to share moundPoints $\endgroup$
    – MarcoB
    Aug 31, 2022 at 16:15
  • $\begingroup$ I have added the data for moundPoints to the bottom of the question. $\endgroup$ Aug 31, 2022 at 16:31
  • $\begingroup$ Are you looking to set a Domain equal to the Complement of the two volumes (in which to solve other equations)? Or are you looking to graph it, which you pretty much already have done? $\endgroup$
    – Nicholas G
    Aug 31, 2022 at 17:36
  • $\begingroup$ I need to set a Domain to the compliment of the two volumes to solve a PDE. $\endgroup$ Aug 31, 2022 at 17:41

2 Answers 2

4
$\begingroup$

There are a few very minor issue in Doug Kimzey's answer.

  1. The mound is concave, not convex.

  2. It did not complete the journey to an ElementMesh.

As I said, these are minor issues.

Onward, using an extremely similar example in Wolfram Mathematica's Element Mesh Generation tutorial, here is an example using the mound data.

Timing[moundPoints = {{14.0667, 32.719, 0.}, {12.8476, 32.1037, 0.}, 
     {8.9873, 29.9502, 0.}, {5.12698, 28.0018, 0.}, 
     {5.22857, 27.7967, 0.}, {1.57143, 25.6431, 0.}, 
     {0.75873, 24.8227, 0.}, {1.87619, 17.9519, 0.}, 
     {2.18095, 12.7219, 0.}, {5.0254, 9.54292, 0.}, 
     {8.07302, 6.26135, 0.}, {11.7302, 3.28743, 0.}, 
     {16.6063, 5.03076, 0.}, {19.5524, 7.90214, 0.}, 
     {23.3111, 10.2608, 0.}, {25.0381, 11.0812, 0.}, 
     {23.4127, 10.0557, 0.}, {26.2571, 13.85, 0.}, 
     {27.4762, 18.9774, 0.}, {24.327, 23.5921, 0.}, 
     {22.1937, 27.0788, 0.}, {18.1302, 29.9502, 0.}, 
     {15.4889, 28.3094, 1.}, {11.3238, 27.0788, 1.}, 
     {7.97143, 24.0023, 1.}, {6.65079, 18.5672, 1.}, 
     {7.05714, 16.5163, 1.}, {10.1048, 13.0296, 1.}, 
     {14.5746, 11.2863, 1.}, {17.6222, 10.7735, 1.}, 
     {21.5841, 12.7219, 1.}, {24.0222, 16.6188, 1.}, 
     {24.6317, 18.2596, 1.}, {23.6159, 23.0794, 1.}, 
     {20.9746, 26.2584, 1.}, {15.7937, 28.0018, 1.}, 
     {13.8635, 26.8737, 2.}, {12.0349, 26.0533, 2.}, 
     {9.19048, 22.4641, 2.}, {8.37778, 20.4131, 2.}, 
     {8.47937, 17.5418, 2.}, {11.1206, 13.85, 2.}, 
     {13.254, 12.927, 2.}, {16.6063, 12.1067, 2.}, 
     {18.7397, 12.2092, 2.}, {20.9746, 13.6449, 2.}, 
     {22.9048, 18.157, 2.}, {22.7016, 22.0539, 2.}, 
     {21.4825, 24.1049, 2.}, {19.4508, 25.3355, 2.}, 
     {16.5048, 26.2584, 2.}, {18.3333, 24.5151, 3.}, 
     {13.9651, 25.6431, 3.}, {12.746, 25.0278, 3.}, 
     {11.6286, 24.31, 3.}, {10.1048, 21.3361, 3.}, {9.8, 18.3621, 3.}, 
     {12.2381, 14.7729, 3.}, {15.5905, 13.6449, 3.}, 
     {19.0444, 13.6449, 3.}, {20.2635, 14.5678, 3.}, 
     {21.4825, 17.4392, 3.}, {21.6857, 20.0029, 3.}, 
     {21.4825, 21.2335, 3.}, {20.4667, 23.0794, 3.}, 
     {18.2317, 24.31, 3.}, {17.0127, 23.4896, 4.}, 
     {15.1841, 24.2074, 4.}, {13.4571, 24.0023, 4.}, 
     {11.2222, 19.9004, 4.}, {11.3238, 18.6698, 4.}, 
     {13.9651, 15.7984, 4.}, {18.3333, 14.8755, 4.}, 
     {19.2476, 15.901, 4.}, {20.0603, 20.1055, 4.}, 
     {18.9429, 22.259, 4.}, {17.1143, 18.5672, 4.8}, 
     {16.8095, 17.8494, 4.7}, {16.9111, 17.2341, 4.8}, 
     {17.5206, 18.5672, 4.8}, {17.5206, 19.1825, 4.7}}; 
   mound = DiscretizeGraphics[ListPlot3D[Join[moundPoints, 
       {{0, 2, 0}, {28, 2, 0}, {0, 34, 0}, {28, 34, 0}}], 
      Boxed -> False, Axes -> False, Mesh -> None, PlotRange -> All]]; 
   building = Select[MeshPrimitives[Cuboid[{0, 2, 0}, {28, 34, 7.2}], 
      2], #1 =!= Polygon[N[{{0, 34, 0}, {28, 34, 0}, {28, 2, 0}, 
          {0, 2, 0}}]] & ];
region = RegionUnion[Append[building, mound]]]

This took 15.625 milliseconds on my machine.

Mathematica graphics

Yes, it makes an ElementMesh ( ToElementMesh[region]["Wireframe"] ).

Mathematica graphics

The machine:

13.2.1 for Microsoft Windows (64-bit) (January 27, 2023) Microsoft Windows 10 Pro 10.0.19045
Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
{NumberOfCores,8} {DisplayVersion,22H2}

Of course, I may have missed something.

$\endgroup$
5
$\begingroup$

Does this work for you?

parkReg = RegionDifference[Region[hexDomain], ConvexHullRegion[moundPoints]]
ConstantRegionQ[parkReg]
Volume[parkReg]

enter image description here

(* True *)
(* 21335. *)
$\endgroup$
3
  • $\begingroup$ Could you send me your timing for the RegionDifference? $\endgroup$ Sep 1, 2022 at 12:57
  • $\begingroup$ @DougKimzey 0.125 seconds in Version 12.3 on Windows 10 on a i9-10885H @ 2.4 GHz with 32 GB Ram $\endgroup$ Sep 1, 2022 at 16:49
  • $\begingroup$ Thank you - RegionPlot3D[] takes a long time on my box. It did not complete in an overnight run. But, not necessary for what I need. $\endgroup$ Sep 2, 2022 at 14:03

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.