update octree and examples

Clean PR for #3681