Wavefront planner algorithm implemented in MATLAB, to compute the optimal path towards the goal using 8-point connectivity.