I need to find the surface area of a region which is within another region. The regions I'm working with are fairly complex and so I'm looking for a general solution, but I'll use a cylinder and tetrahedron as an example.
Lets say I have the following regions:
Container = Cylinder[{{0, 0, 0}, {0, 0, 2}}, 1];
MyRegion = Tetrahedron[{{0, 2, 0}, {0, -2, 0}, {-2, 0, 0}, {0, 0, 2.5}}];
I want to find the surface area of MyRegion
which is contained by Container
The way I imagined doing this was using RegionIntersection
, finding a boundary mesh, and then using Area
. Then I would need to somehow figure out what area of the intersection is not in common with the boundary of MyRegion
, but I'm not sure how to approach that or if that is even the best method. Any suggestions?
Edit:
My code generates a function that is used in an implicit region - so its not always the same. I've included a sample one below (sorry - I was trying to avoid posting such a large function). Technically I'm just interested in the surface area, but as I have it, the ImplicitRegion it will be a volume.
f[x_,y_,z_]:=0.564936 Log[(
6.2 + 2 Sqrt[((-3.1 + y)^2 + (-1.67 + z)^2)^2 + (-3.1 - Abs[0. + x])^2] +
2 Abs[0. + x])/(-6.2 + 2 Sqrt[((-3.1 + y)^2 + (-1.67 + z)^2)^2 + (3.1 -
Abs[0. + x])^2] + 2 Abs[0. + x])] +
0.564936 Log[(6.2 + 2 Sqrt[((3.1 + y)^2 + (-1.67 + z)^2)^2 + (-3.1 -
Abs[0. + x])^2] + 2 Abs[0. + x])/(-6.2 + 2 Sqrt[((3.1 + y)^2 +
(-1.67 + z)^2)^2 + (3.1 - Abs[0. + x])^2] + 2 Abs[0. + x])] -
0.564936 Log[(6.2 + 2 Sqrt[((0. + y)^2 + (0. + z)^2)^2 + (-3.1 -
Abs[0. + x])^2] + 2 Abs[0. + x])/(-6.2 + 2 Sqrt[((0. + y)^2 +
(0. + z)^2)^2 + (3.1 - Abs[0. + x])^2] + 2 Abs[0. + x])] +
0.564936 Log[(6.2 + 2 Sqrt[((-3.1 + x)^2 + (-1.67 + z)^2)^2 + (-3.1 -
Abs[0. + y])^2] + 2 Abs[0. + y])/(-6.2 + 2 Sqrt[((-3.1 + x)^2 +
(-1.67 + z)^2)^2 + (3.1 - Abs[0. + y])^2] + 2 Abs[0. + y])] +
0.564936 Log[(6.2 + 2 Sqrt[((3.1 + x)^2 + (-1.67 + z)^2)^2 + (-3.1 -
Abs[0. + y])^2] + 2 Abs[0. + y])/(-6.2 +
2 Sqrt[((3.1 + x)^2 + (-1.67 + z)^2)^2 + (3.1 - Abs[0. + y])^2] +
2 Abs[0. + y])] - 0.564936 Log[(6.2 + 2 Sqrt[((-3.1 + x)^2 +
(0. + z)^2)^2 + (-3.1 - Abs[0. + y])^2] + 2 Abs[0. + y])/(-6.2 +
2 Sqrt[((-3.1 + x)^2 + (0. + z)^2)^2 + (3.1 - Abs[0. + y])^2] +
2 Abs[0. + y])] - 0.564936 Log[(6.2 + 2 Sqrt[((3.1 + x)^2 +
(0. + z)^2)^2 + (-3.1 - Abs[0. + y])^2] + 2 Abs[0. + y])/(-6.2 +
2 Sqrt[((3.1 + x)^2 + (0. + z)^2)^2 + (3.1 - Abs[0. + y])^2] +
2 Abs[0. + y])] + 0.564936 Log[(1.51 + 2 Sqrt[((-3.1 + x)^2 +
(-3.1 + y)^2)^2 + (-0.755 - Abs[-0.915 + z])^2] + 2 Abs[-0.915 + z])/
(-1.51 + 2 Sqrt[((-3.1 + x)^2 + (-3.1 + y)^2)^2 + (0.755 - Abs[-0.915 +
z])^2] + 2 Abs[-0.915 + z])] + 0.564936 Log[(1.51 + 2 Sqrt[((3.1 + x)^2 +
(-3.1 + y)^2)^2 + (-0.755 - Abs[-0.915 + z])^2] + 2 Abs[-0.915 + z])/
(-1.51 + 2 Sqrt[((3.1 + x)^2 + (-3.1 + y)^2)^2 + (0.755 -
Abs[-0.915 + z])^2] + 2 Abs[-0.915 + z])] + 0.564936 Log[(
1.51 + 2 Sqrt[((-3.1 + x)^2 + (3.1 + y)^2)^2 + (-0.755 - Abs[-0.915 + z])^2] + 2 Abs[-0.915 + z])/(-1.51 + 2 Sqrt[((-3.1 + x)^2 + (3.1 + y)^2)^2 + (0.755 -
Abs[-0.915 + z])^2] + 2 Abs[-0.915 + z])] + 0.564936 Log[(
1.51 + 2 Sqrt[((3.1 + x)^2 + (3.1 + y)^2)^2 + (-0.755 -
Abs[-0.915 + z])^2] + 2 Abs[-0.915 + z])/(-1.51 + 2 Sqrt[((3.1 + x)^2 +
(3.1 + y)^2)^2 + (0.755 - Abs[-0.915 + z])^2] + 2 Abs[-0.915 + z])] -
0.564936 Log[(1.67 + 2 Sqrt[((0. + x)^2 + (0. + y)^2)^2 + (-0.835 -
Abs[-0.835 + z])^2] + 2 Abs[-0.835 + z])/(-1.67 + 2 Sqrt[((0. + x)^2
+ (0. + y)^2)^2 + (0.835 - Abs[-0.835 + z])^2] + 2 Abs[-0.835 + z])];
MyRegion=ImplicitRegion[f[x, y, z] >= 5, {{x, -5.3, 5.3}, {y, -5.3, 5.3}, {z, 0, 1.67}}]
Container=Cylinder[{{0,0,0},{0,0,1.67}},5.3]
Area[RegionIntersection[RegionBoundary[myRegion], container]]
, but I'm not near a Mathematica instance right now to try it out and I recall it having trouble with intersections of regions of different dimensionalities. $\endgroup$RegionBoundary[MyRegion]
is of a different dimension thanContainer
$\endgroup$