extract_contour_regions Function

public function extract_contour_regions(x_grid, y_grid, z_grid, levels) result(regions)

Extract polygonal regions between contour levels using marching squares

Given: 2D grid data and contour levels When: Processing grid to find regions between levels Then: Returns array of regions with boundary polygons

This is the main function for contour polygon decomposition that enables filled contour rendering across all backends.

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: x_grid(:)
real(kind=wp), intent(in) :: y_grid(:)
real(kind=wp), intent(in) :: z_grid(:,:)
real(kind=wp), intent(in) :: levels(:)

Return Value type(contour_region_t), allocatable, (:)