Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fields are 2D float matrices with additional attributes, which can be created from image, raster files, CSV files, grids, or by hand. They can also possess 'bands' (additional 'layers' sharing the same dimensions..) The main purpose of fields is to replace grids when the latter ones are only used for storing and reading/writing float discrete values. Fields can be displayed using the new 'mesh' layer, which is also able to take care of no_data values by default. Fields are already usable as is, with a read/write access through col/row (like matrices) or through a world location (my_field[my_agent.location]). They are already used for the generation of terrains in the physics plugin and can be used as a replacement of grids in the diffusion statement. What's missing: - obtaining a pseudo-shape for one cell (in order to verify intersections, etc.) (my_field.cell_at(location)) - obtaining the list of values overlapping an existing geometry (my_field[my_agent.shape]) or the list of pseudo-shapes (my_field.cells_at(shape)) - specifying color schemes (gradients, palettes, scales) for drawing meshes. - more examples involving this new feature !
- Loading branch information