1 /** This file is part of Shapes.
3 ** Shapes is free software: you can redistribute it and/or modify
4 ** it under the terms of the GNU General Public License as published by
5 ** the Free Software Foundation, either version 3 of the License, or
8 ** Shapes is distributed in the hope that it will be useful,
9 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ** GNU General Public License for more details.
13 ** You should have received a copy of the GNU General Public License
14 ** along with Shapes. If not, see <http://www.gnu.org/licenses/>.
16 ** Copyright 2008, 2014 Henrik Tidefelt
21 •rand: [newRandom (•time)]
23 pth: @defaultunit:1%C | (0cm,0cm)>(^1)--(^~1.3)<(3cm,0cm)--(^~0.5)<(1cm,3cm)--cycle
27 c0: [stroke [circle 3bp]]
28 c1: [stroke [circle 5bp]]
32 [[shift [pth [pth t0].length + delta].p] c0]
34 [[shift ([pth t0] + delta).p] c1]
38 [[range '0 '15].foldsl
39 \ p e •st → ( p & [test 40*[random1D •st] 20cm*[random1D •st]] )
45 pth: @defaultunit:1%C | (4cm,0cm,0cm)>(5cm,0cm,1cm)--(3cm,1cm,0cm)<(7cm,0cm,2cm)--(5.5cm,1.5cm,~1cm)<(5cm,3cm,~1cm)--cycle
46 |** pth: [immerse [shift (4cm,0)] [] ../pth]
48 c0: [stroke [circle 3bp]]
49 c1: [stroke [circle 5bp]]
51 •page << view [] [stroke pth]
55 [[shift view [] [pth [pth t0].length + delta].p] c0]
57 [[shift view [] ([pth t0] + delta).p] c1]
61 [[range '0 '15].foldsl
62 \ p e •st → ( p & [test 40*[random1D •st] 20cm*[random1D •st]] )