Each frame a new slice of the 3D noise is used as a grid of 1's and 0's which is stored as a nested list. If each value in the field is thought of as a corner of a square, the grid can be represented as a grid of squares with corners of either 1 or 0. A line is then drawn (on not drawn) through the squares that cuts off the corners of value 1 from those of 0. This can be shown by assigning the corners variable to True (see code), where a white dot represents a 1 and a black dot represents a 0.
Each frame a new grid is created which slows the program down significantly. There are probably many ways of optimising this process which I might come back to.