Package: gsk

Function gsk:path-point-curvature

Lambda List

gsk:path-point-curvature (point path direction center)

Arguments

point -- a gsk:path-point instance
path -- a gsk:path instance with the path that point is on
direction -- a gsk:path-direction value with the direction for which to return the curvature
center -- a graphene:point-t instance which will be set with the center of the osculating circle

Return Value

The float with the curvature of the path at the given point.

Details

Calculates the curvature of the path at the point. Returns the center of the osculating circle as well. The curvature is the inverse of the radius of the osculating circle.

Lines have a curvature of zero, indicating an osculating circle of infinite radius. In this case, the center is not modified. Circles with a radius of zero have INFINITY as curvature.

Note that certain points on a path may not have a single curvature, such as sharp turns. At such points, there are two curvatures - the limit of the curvature of the path going into the point, and the limit of the curvature of the path coming out of it. The direction argument lets you choose which one to get.

Figure: Curvature at point
 

See also

2024-11-9