prepare manual for rest conversion
[PyX/mjg.git] / examples / path / intersect.txt
blob9ef0bb89b3b08aa338100c643b67dd5aee645ca2
1 Intersection points between paths
3 The `intersect` method of a path allows for the calculation of intersection
4 points between this path and the second path passed to the `intersect` method. ...
5 The return value of the intersect method is a tuple of two lists, where each
6 list contains parametrization instances for the intersection points. The first
7 list are the parameters for the path the `intersect` method was called for. The
8 second list are the parameter values for the path passed to the `intersect`
9 method. Thus we can calculate the first intersection point `x1, y1` by
11     x1, y1 = p1.at(a1)
13 as done in the example or alternatively by
15     x1, y1 = p2.at(b1)
17 ! When several intersections between two paths occur, the order of the
18 intersection points is defined by the order in which the points are passed when
19 walking along the first path.