<p>What is an efficient way to calculate the volume of intersection of two arbitrary volumes described as closed surfaces? That is, with two meshes, A and B, how do I calculate the intersection of A and B? Is Sutherland Hodgman clipping applicable to arbitrary 3D volumes?</p>
<p>To be clear, the volumes in question are not necessarily simple, nor are they necessarily convex. Some could be described as parametric equations, others not so much.</p>

CC BY-SA 4.0
2021-06-17T12:11:13.167Z
Sutherland Hodgman can clip a convex polygon against a concave polygon. But concave against concave won't work. This can be overcome by dividing one of the polygons into multiple convex polygons then clipping each convex against the concave.
pmw1234
CC BY-SA 4.0
2021-06-17T12:14:19.880Z
Also, it is worth mentioning that many implementations of SH will only work with two convex polygons in 3D.
pmw1234
CC BY-SA 4.0
2021-07-07T02:33:49.680Z
Do you want to check whether an intersection had occured or do you want to find out the polygon that results from the intersection ?
Kaan E.
CC BY-SA 4.0
2021-07-07T02:44:32.003Z
The latter. I want to be able to calculate the intersection, union, or difference of two meshes.
Ethan Reesor
<opengl><3d>
Calculating the intersection of two volumes
Ethan Reesor
# Calculating the intersection of two volumes

(Asked by: username_0 on 2021-06-16)

What is an efficient way to calculate the volume of intersection of two arbitrary volumes described as closed surfaces? That is, with two meshes, A and B, how do I calculate the intersection of A and B? Is Sutherland Hodgman clipping applicable to arbitrary 3D volumes?

To be clear, the volumes in question are not necessarily simple, nor are they necessarily convex. Some could be described as parametric equations, others not so much.

**Tags:** opengl, 3d

> **Comments:**
> **username_1**: Sutherland Hodgman can clip a convex polygon against a concave polygon. But concave against concave won't work. This can be overcome by dividing one of the polygons into multiple convex polygons then clipping each convex against the concave.  
> **username_1**: Also, it is worth mentioning that many implementations of SH will only work with two convex polygons in 3D.  
> **username_2**: Do you want to check whether an intersection had occured or do you want to find out the polygon that results from the intersection ?  
> **username_0**: The latter. I want to be able to calculate the intersection, union, or difference of two meshes.  

---

## 0 answers

