摘要 |
Methods, systems, and apparatus, including computer program products, for calculating or applying a gradient over a region in a multi-dimensional space. A boundary defines the shape of the region. A gradient specifies a value transition between a starting position and an ending position. The following actions are performed to calculate a gradient value at any point in the selected region: determining an interpolation vector extending from an effective origin included in the starting position through the point to the ending position and defining a gradient value for the point according to the gradient and based on the position of the point along the interpolation vector relative to the effective origin and an intersection point where the interpolation vector meets the boundary.
|