PyX — Examples: Path features
In this section we demonstrate the capabilities of paths in PyX. The goal is to give an overview of those operations that are intrinsic to paths and do not affect their drawing on a canvas.
Overview for this section
Adding and joining paths
The result of this example looks the same as the pathitem example from the Basic drawing section. However, we are using a different approach to construct the paths in this example: we add and join paths. more ...
Arc length of a path
In this example we use the arclen
method of the path instance p1
to get the arc length and create a straight line p2
with the same arc length.
more ...
Positions along a path
There are several methods to access certain positions at a path. At first there are atbegin
and atend
methods, which return a coordinate tuple.
more ...
Splitting paths
In this example we use the split
method of a path to split it into several paths. Similar to the at
method you can pass a list of numbers to the split method (or PyX length instances) to specify the splitting point by the arc length
more ...
Intersection points between paths
The intersect
method of a path allows for the calculation of intersection points between this path and the second path passed to the intersect
method.
more ...