diff options
Diffstat (limited to 'info/drawing-with-metapost/src/torn-edge.mp')
-rw-r--r-- | info/drawing-with-metapost/src/torn-edge.mp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/info/drawing-with-metapost/src/torn-edge.mp b/info/drawing-with-metapost/src/torn-edge.mp new file mode 100644 index 0000000000..5d0afface0 --- /dev/null +++ b/info/drawing-with-metapost/src/torn-edge.mp @@ -0,0 +1,7 @@ +vardef signr suffix $ = + if $<0: - else: + fi uniformdeviate 1 + enddef; +vardef walkr suffix $ = + $ := $ if uniformdeviate 1 < (2**-abs($)): + else: - fi signr $; + $ + enddef; |