Skip to main content

irregular_grid_image

Function irregular_grid_image 

Source
pub fn irregular_grid_image(
    x: &[f64],
    y: &[f64],
    values: &[f64],
    rows: usize,
    cols: usize,
) -> Option<GridImage>
Expand description

Rasterize a triangulation to a rows x cols value image by barycentric linear interpolation, for Visualization.IRREGULAR_GRID.

The image covers the axis-aligned bounding box of the finite input points. Pixel (r, c) samples the value at the pixel center; pixels whose center falls outside the triangulated convex hull are left NaN (no value), like LinearTriInterpolator’s masked output.

Returns None when the points cannot be triangulated or rows/cols is 0.