# Calculate the line of intersection between two surfaces in Surfer

In Surfer, you can find the line of intersection between a geological horizon or water table and the ground surface, between a laser-scan surface and an inclined plane, or between any two surfaces.

To start, you need one grid file for each surface, where both grid files have the same:

Once the grids meet the criteria above, you can follow the steps below to find the line of intersection between the two surfaces.

1. Subtract the two grid files to find where the difference is 0 (i.e. where they intersect).
1. Click the Grids | Calculate | Math command.
2. In the Grid Math dialog, click the Add Grids button.
3. In the Open Grid(s) dialog, select the first grid file, hold CTRL, select the second grid file, and click Open
4. Type the equation B – A into the function box (it doesn't matter which grid is A and which is B).
5. Give the Output Grid File a name.
6. Select Contour from the New layer type list.
7. Click OK.

Use the Grid Math command to subtract one surface from the other. Where the difference is 0, the surfaces are intersecting.

1. Display a contour map of the output grid, showing only the zero contour level.
1. Click Home | New Map | Contour, select the grid file created during the Grid Math operation, and click Open.
2. In the Contents window, select the Contours layer.
3. In the Properties window, on the Levels page, change the Minimum contour to and the Maximum contour to 1. Now only the 0 level is shown, which is the line of intersection between the two surfaces.

Create a contour map showing the zero-level contour line.
This line represents where the two surfaces intersect.

From here, if desired, you can use the Home | Add to Map | Layer command add other layers to the map, and you can adjust the contour map properties to display fill above or below the intersection line.

Overlay the contact line between the two surfaces with
other map types, such as a shaded relief map.

Additionally, you can use the Map Tools | Layer Tools | Export Contours to export the line of intersection for use in other software.

Updated November 2021