Dear vtk-users,

During an internship at the Max Planck Institute for Plasma physics I have used your library a lot for interpolating from a structured grid of the fusion device we have here which has a very complicated geometrical structure(torus with a five-fold symmetry) onto an equidistant Cartesian grid. The purpose of this interpolation is to be able to easily calculate gradients of a given scalar parameter. Therefore I have generated the grid by using the StructuredGrid() object with dimensions (139,512,35) which corresponds to directions (r, theta, phi) in a torus shape. All vtkDataSets have the function FindCell() which the vtkStructuredGrid-object inherits. Using this function I want to find which cell in the warped torus-shaped grid a point in my cartesian grid belongs to. However to be able to this the parameter tol2 needs to be set to an unreasonably large value. My interpretation of this value is that it is the tolarance squared of the distance to the closest vertex of the resulting cell the point I am searching for is said to belong to. Please correct me if I am wrong.

I found the documentation of the FindCell-function a bit ambigous, is it possible to get a more thorough explanation of how the function works and especially how to interpret the tol2 parameter?

Also I would like to get an explanation on how cells are generated when constructing the vtkStructuredGrid?

Currently I am confirming the correct structure by plotting the gridplanes using mayavi, but I am not satisfied since I do not actually see the shape of the cells. Do you have an easy method of confirming the right cell structure and that there is no empty space in between cells?

Best regards,

Johan