Determine the tiles intercepted by a given function in an irregular tessellation

69 Views Asked by At

Consider an irregular tessellation of the plane composed of convex tiles, such as the following one.

enter image description here

For each tile, the coordinates of each vertex (black dots) are known up to a finite precision.

Now, consider a function $f(x)$, whose values are also known up to a certain precision. This function can clearly cross some of the tiles, as illustrated here:

enter image description here

I have to find which tile is crossed by the function $f$ (in this example, the tiles $t_1,t_2,t_5$).

In principle, one can simply use the function $\texttt{inpolygon}$, available in many software, to determine whether or not the polygon describing the tile contains or not one point of coordinates $(x,f(x))$.

However, I realized that the results (i.e. the list of tiles crossed by the functions) strongly depends on the precision of the knowledge of the tiles' coordinates and the function $f$.

For instance, in situations similar to the above example, sometimes also the tile $t_3$ appears to be part of the list of involved tiles, irrespective on the fact that I always include/exclude the boundary of the tile in the function $\texttt{inpolygon}$.

My question is: Given the fact that, to a certain extent, I can increase/reduce the precision of the coordinates of the tiles and the precision of the coordinates of the function $f$,

What is the best strategy to solve this task, reducing the number of results strongly dependent only on these precision values?

Thanks for your help, and sorry in case this is too trivial.