landlab.components.lateral_erosion.node_finder¶
- angle_finder(grid, dn, cn, rn)[source]¶
Find the interior angle between two vectors on a grid.
- Parameters:
- Returns:
Angle between vectors (in radians).
- Return type:
Examples
>>> import numpy as np >>> from landlab import RasterModelGrid >>> from landlab.components.lateral_erosion.node_finder import angle_finder
>>> grid = RasterModelGrid((3, 4)) >>> np.rad2deg(angle_finder(grid, 8, 5, 0)) 90.0 >>> np.rad2deg(angle_finder(grid, (8, 9, 10, 6), 5, 6)) array([135., 90., 45., 0.])