# Combination Constraints of Multiple Fields for Implicit Modeling of Ore Bodies
## 4 Combination Constraints
### Combination Rules
#### 4.2.1 Combination Operations  
Similar to the Boolean operations of the CSG technology, three basic combination operations of intersection operation, union operation and difference operation are defined. The set operations are calculated with respect to the interior of the sub-fields. For a given point, as long as the sign of the function value of the point is evaluated, the position of the point in each sub-field is easy to determine. Taking the two intersected fields A and B in Figure 1 as an example, Figure 2 shows the signed distance values of the combined field using a different combination of operations.  
(1) Intersection operation  
The intersection operation of two fields A and B, denoted as \(A\cap B\), is the combined field containing the intersected interior of \(A\) and \(B\). The combined field of \(A\cap B\) is expressed as  
\[F(\mathbf{x})=f_{A\cap B}(\mathbf{x})=max(f_{A}(\mathbf{x}),f_{B}(\mathbf{x})) \tag{10}\]  
where \(f_{A}(\mathbf{x})\) is the implicit function of field \(A\) and \(f_{B}(\mathbf{x})\) is the implicit function of field \(B\).  
The combined bounding box of the combined field, denoted as \(B_{F}(\mathbf{x})\), is expressed as  
\[B_{F}(\mathbf{x})=B_{f_{A\cap B}}(\mathbf{x})=max\Big{(}B_{f_{A}}(\mathbf{x}),B_{f_{B}}( \mathbf{x})\Big{)} \tag{11}\]  
where \(B_{f_{A}}(\mathbf{x})\) is the implicit function of the bounding box with respect to field \(A\) and \(B_{f_{B}}(\mathbf{x})\) is the implicit function of the bounding box with respect to field \(B\).  
(2) Union operation  
The union operation of two fields \(A\) and \(B\), denoted as \(A\cup B\), is the combined field containing both the interior of \(A\) and \(B\). The combined field of \(A\cup B\) is expressed as  
\[F(\mathbf{x})=f_{A\cup B}(\mathbf{x})=min(f_{A}(\mathbf{x}),f_{B}(\mathbf{x})) \tag{12}\]  
The combined bounding box of the combined field is expressed as  
\[B_{F}(\mathbf{x})=B_{f_{A\cup B}}(\mathbf{x})=min\Big{(}B_{f_{A}}(\mathbf{x}),B_{f_{B}}( \mathbf{x})\Big{)} \tag{13}\]  
Figure 2: Combination operations of two fields A and B: (**a**) union operation \(A\cup B\); (**b**) intersection operation \(A\cap B\); (**c**) difference operation \(A\odot B\); (**d**) difference operation \(B\odot A\). The range of signed distance values corresponds to the color bar.  
(3) Difference operation  
The difference operation of two fields \(A\) and \(B\), denoted as \(A\odot B\), is the combined field containing the intersected interior of \(A\) and \(-B\). \(-B\) is the complement operation of \(B\). The complement operation satisfies \(f_{-B}(\mathbf{x})=-f_{B}(\mathbf{x})\). The combined field of \(A\odot B\) is expressed as  
\[F(\mathbf{x})=f_{A\odot B}(\mathbf{x})=f_{A\cap(-B)}(\mathbf{x})=max(f_{A}(\mathbf{x}),-f_{B}( \mathbf{x})) \tag{14}\]  
The combined bounding box of the combined field is expressed as  
\[F(\mathbf{x})=f_{A\odot B}(\mathbf{x})=f_{A\cap(-B)}(\mathbf{x})=max(f_{A}(\mathbf{x}),-f_{B}( \mathbf{x})) \tag{15}\]  
In the practice of orebody modeling, some complex combination rules can be combined based on the above combination operations. The hierarchical combination operations lead to an operation tree. The intersection operation, union operation and difference operation are viewed as nodes in the operation tree. A leaf node of the operation tree corresponds to a sub-field, a non-leaf node corresponds to a combined sub-field, and the root node corresponds to the final combined field.