# 13.5 Finite Difference Schemes

The level set equation

 (13.2)

can be viewed as a special Hamilton-Jacobi equation

where denotes first order derivatives of  with respect to the space variables. The Hamiltonian  is a smooth function and non-smooth solutions must be admitted (in order to model corners).

In order to discretize the level set equation (13.2), one approach is to substitute the time derivative with a forward difference and the spatial derivatives with central differences. Considering the case of a corner with a right angle at the outside (for the shape cf. Figure 13.5) and a constant speed function shows that the central difference approximation chooses a wrong value for the gradient at the point in the corner. More precisely the exact solution for is a constant except at the corner, where the same value should be chosen and the slope is not defined. The central difference approximation sets the undefined slope to the average of the left and right slopes, which yields a different limit solution. Hence the wrong calculations of the slope propagate away from the corner and form oscillations. Increasing the resolution in time only results in more oscillations, which is illustrated in [121].

Another approach is to add a viscosity term to the right hand side and thus to consider the new Hamilton-Jacobi equation