Trees | Indices | Help |
---|
|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
Creates a new empty spline curve. You need to set the curve points using Spline.set_points() before any sampling along the curve.
Alternatively, use
Since: 2.45 |
Frees a spline curve and all associated resources. Since: 2.45 |
Creates a copy of a spline curve.
Since: 2.49 |
Gets the number of points of a spline curve.
Since: 2.45 |
Gets the slackness parameter of a spline curve. See Spline.set_slackness() for discussion.
Since: 2.45 |
Reports whether a spline curve is closed or not. See Spline.set_closed() for discussion.
Since: 2.45 |
Sets the coordinates of XY points a spline curve should pass through. It is possible to pass The coordinates should be device-scaled, i.e. they should data field rows and columns, or screen or image pixels. Generally, the unit length should be about the smallest distinguishable distance. This is important namely for Spline.sample_naturally() that stops refining the curve when the details become too tiny, even though there may be sharp changes of direction. It is also important if the physical X and Y scales differ. Using unscaled physical coordinates may produce odd results.
Since: 2.45 |
Sets the slackness parameter of a spline curve. The slackness parameter determines how taut or slack the curve is. The curve always passes through the given XY points. For zero slackness the curve is maximally taut, i.e. the shortest possible passing through the points. Such curve is formed by straight segments. For slackness of 1 the curve is a ‘free’ spline. Values smaller than 1 mean tensile stress while values larger than 1 compressive stres. The default value is 1/sqrt(2).
Since: 2.45 |
Sets whether a spline curve is closed or open. In closed curve the last point is connected smoothly with the first
point, forming a cycle. Note you should not repeat the point in the
An open curve begins with the first point and ends with the last point. It has zero curvature at these two points.
Since: 2.45 |
Calculates the length of a spline curve. This is useful when you want to sample the curve with a specific step (at least approximately). Note Spline.sample_uniformly() also returns the length.
Since: 2.45 |
Gets the coordinates of spline curve points. If the spline is empty (there are no points) the function returns
Since: 2.45 |
Gets tangents to the curve in its defining points. See Spline.sample_uniformly() for discussion. If the spline is empty (there are no points) the function returns
Since: 2.45 |
Samples efficiently a spline curve. This function calculates coordinates of points that lie on the spline curve and are sufficient for a good approximation by straight lines. This is particularly useful for drawing the curve. See Spline.sample_uniformly() for some discussion of closed versus open curves and corner case handling.
Since: 2.45 |
Samples uniformly a spline curve. This function calculates coordinates of points that lie on the spline curve and are equidistant along it. For open curves the first sampled point coincides with the first given XY point and, similar, the last with the last. For closed curves the first point again coincides with the first given XY point but the last lies one sampling distance before the curve gets back again to the first point. If you want to specify the sampling step instead of the number of
samples use Spline.length() first to obtain the curve length and
calculate A single-point curve always consists of a single point. Hence all
samples lie in this point. A two-point curve is always formed by
straight segments, in the case of a closed curve one going forward and
the other back. A meaningful sampling requires The tangents vectors stored in
Since: 2.45 |
Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 | http://epydoc.sourceforge.net |