Get the Volume of Intersection Between Two 3D Shapes?
31 次查看(过去 30 天)
显示 更早的评论
The shapes I have in my mind are rather simple (cuboids and cylinders) [and I know I can hard code a way to get the intersection volume of cuboid, but cylinders seem to be a little harder, and hard-coding may not be time efficient. The cylinders are specified by: a centre [x,y,z]; radius; half-length; and axis vector (e.g. 1 0 0, 0 1 0, 0 1 1). The cuboids are specified by: a centre [x,y,z]; half_length_x; half_length_y & half_length_z.
What I want to get is, with two of these pre-defined shapes input as above, the volume of intersection in m^3 (say 1 unit = 1 m) of the two shapes.
2 个评论
回答(1 个)
darova
2019-11-6
Use equations to get intersection lines:
Integral can be used to calculate the volume (1/8 of the volume)
and
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 3-D Volumetric Image Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!