display shorter text on examples page
[PyX/mjg.git] / gallery / path / springs.txt
blob936a49759dfdc4e2be21a3dfac03dc03a8da663c
1 Deforming paths
3 In this example, another type of stroke attributes is demonstrated, namely the
4 `deformers`. They take an original curve and return a modified one. Here, the
5 first deformer bends three arcs into spirals, the next one smooths the result
6 a bit. ...
8 In the example code, a circle is first created and then split into three
9 segments. Each segment of the arc is then stroked with `deformer.cycloid` and
10 `deformer.smoothed`, which create the spring-like look of the segments. The
11 cycloid does not start at the very beginning of the original path. Instead, it
12 first follows the original path for a certain length and then starts, yielding
13 a sharp corner. This corner is smoothed a bit by the second deformer.
15 ! Note that the order of the deformer attributes is not arbitrary, since the
16 deforming operations do not commute.
18 The two circles surrounding the springs are not created as simple circles but
19 rather as the curves with constant distance to the original circle. This
20 demonstrates the use of a third deformer, namely `deformer.parallel`.