What is the algorithm which transforms the octree/quadtree into a grid? i.e, getting the adjacency or connectivity between the cells in order to be able to perform interpolation, gradient,...etc. I am trying to do it on the fly. I ended up using the following procedure:
- Check if a voxel is to be divided.
- If true, create new 4 quads or 8 voxels.
- For each face (or edge in case of 2D), update the connectivity by checking neighbors of the parent cells.
However, it is not clear to me how to control the maximum refinement ratio.