# Algorithm to explore a 3D scalar potential

I have to write an algorithm/code to reconstruct an unknown 3D scalar potential $V(\mathbf{r})$ up to a specified threshold $E_c$ (assume that the potential is monotonic)

The problem has the following rules:

1. You start from the minimum of the potential and define a grid
2. you can only do "small" steps, i.e. you can only move to the neighboring points with respect to where you are (random sampling is not possible)
3. at the end of the procedure, all the points $\mathbf{r}_i$ of the grid having $V(\mathbf{r}_i)<E_c$ must be known.

Is the a algorithm or a keyword that I can look for in google for this kind of problem?

Thanks

• Sounds solvable by breadth first search (BFS). – rchilton1980 Jun 17 '14 at 11:57
• This could be easily solved with a flood fill algorithm. – Doug Lipinski Jun 17 '14 at 20:15
• Is this similar to an isosurface and applying marching cubes? – André Jun 18 '14 at 6:25
• Thanks for the suggestions. I think that the tricky part is how to plan the movements in 3D space and I'm trying to understand if BFS can be of help. – Pie86 Jun 18 '14 at 10:19
• This question (stackoverflow.com/questions/24107769/…) implements BFS on a 3D grid. Anyway there are "big" steps between the points that are explored. – Pie86 Jun 18 '14 at 16:02