Contour polygon decomposition for extracting filled regions
This module provides functions for decomposing 2D contour data into polygonal regions between contour levels, supporting filled contour visualization across PNG, PDF, and ASCII backends.
= Key Types = - contour_region_t: Represents a single contour region with boundary - contour_polygon_t: Polygon boundary with points
= Core Functions = - extract_contour_regions: Main polygon decomposition function - get_region_boundaries: Extract boundary points for regions
Author: fortplot contributors
Polygon boundary with ordered vertex points
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=wp), | public, | allocatable | :: | x(:) | |||
real(kind=wp), | public, | allocatable | :: | y(:) | |||
logical, | public | :: | is_closed | = | .false. |
Region between contour levels with boundary polygons
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=wp), | public | :: | level_min | = | 0.0_wp | ||
real(kind=wp), | public | :: | level_max | = | 0.0_wp | ||
type(contour_polygon_t), | public, | allocatable | :: | boundaries(:) | |||
integer, | public | :: | region_id | = | 0 |
Extract polygonal regions between contour levels using marching squares
Type | Intent | Optional | 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(:) |