Figure 6: The flow chart of Octree algorithm.