A computer-implemented method for determining an intersection between a representation of a boundary of a surface in an earth formation and a plane, the method comprising: receiving a representation of a boundary of a surface in an earth formation using a processor, the representation comprising a closed loop made up of a series of straight segments with vertices between segments referred to as points; overlaying a cutting grid comprising grid planes over the representation using the processor; and characterised by comprising: identifying a specific pattern that represents a first segment adjacent to a second segment in the representation by proceeding from the first segment to the second segment thereby defining a rotational direction using the processor; matching the specific pattern to a reference pattern in a plurality of reference patterns using the processor, the reference pattern comprising indication that the point between the first segment and the second segment is an intersection point or a non-intersection point based on pattern criteria comprising a position of the first segment with respect to a cutting plane in the cutting grid, a position of the second segment with respect to the cutting plane, and the rotational direction going from the first segment to the second segment; categorizing the point between the two adjacent segments as an intersection point or as a non-intersection point based on the reference pattern using the processor, wherein both of the points of a segment being above or below the plane indicates no intersection; iterating the identifying, the matching, and the categorizing for each pair of adjacent segments in the representation such that each point between adjacent segments in the closed loop of the representation is categorized using the processor; calculating a parameter of the earth formation with the intersection points as input using the processor; and performing an action related to the earth formation using the parameter and associated equipment for performing the action. receiving a representation of a boundary of a surface in an earth formation using a processor, the representation comprising a closed loop made up of a series of straight segments with vertices between segments referred to as points; overlaying a cutting grid comprising grid planes over the representation using the processor; and characterised by comprising: identifying a specific pattern that represents a first segment adjacent to a second segment in the representation by proceeding from the first segment to the second segment thereby defining a rotational direction using the processor; matching the specific pattern to a reference pattern in a plurality of reference patterns using the processor, the reference pattern comprising indication that the point between the first segment and the second segment is an intersection point or a non-intersection point based on pattern criteria comprising a position of the first segment with respect to a cutting plane in the cutting grid, a position of the second segment with respect to the cutting plane, and the rotational direction going from the first segment to the second segment; categorizing the point between the two adjacent segments as an intersection point or as a non-intersection point based on the reference pattern using the processor, wherein both of the points of a segment being above or below the plane indicates no intersection; iterating the identifying, the matching, and the categorizing for each pair of adjacent segments in the representation such that each point between adjacent segments in the closed loop of the representation is categorized using the processor; calculating a parameter of the earth formation with the intersection points as input using the processor; and performing an action related to the earth formation using the parameter and associated equipment for performing the action. identifying a specific pattern that represents a first segment adjacent to a second segment in the representation by proceeding from the first segment to the second segment thereby defining a rotational direction using the processor; matching the specific pattern to a reference pattern in a plurality of reference patterns using the processor, the reference pattern comprising indication that the point between the first segment and the second segment is an intersection point or a non-intersection point based on pattern criteria comprising a position of the first segment with respect to a cutting plane in the cutting grid, a position of the second segment with respect to the cutting plane, and the rotational direction going from the first segment to the second segment; categorizing the point between the two adjacent segments as an intersection point or as a non-intersection point based on the reference pattern using the processor, wherein both of the points of a segment being above or below the plane indicates no intersection; iterating the identifying, the matching, and the categorizing for each pair of adjacent segments in the representation such that each point between adjacent segments in the closed loop of the representation is categorized using the processor; calculating a parameter of the earth formation with the intersection points as input using the processor; and performing an action related to the earth formation using the parameter and associated equipment for performing the action.