Learn R Programming

ocean (version 0.1-0)

calculate.element.size: Calculates the size of element in the grid

Description

Given an unstructured grid, calculate.element.size calculates the area of each element in it. The sizes are added to the grid as an additional attribute grid$elems$size and the modified grid is returned.

Arguments

grid
The grid for which element sizes should be calculated.

Value

  • A modified grid with grid$elems$size added.

Examples

Run this code
## Use the grid created in the att.plot example
example(att.plot)
## Calculate the size of the elements and plot them
grid <- calculate.element.size(grid)
att.plot(grid, grid$elems$size)

Run the code above in your browser using DataLab