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 Henrik Tidefelt
19 •rand: [newRandom (•time)]
21 pth: @defaultunit:1%C | (0cm,0cm)>(^1)--(^~1.3)<(3cm,0cm)--(^~0.5)<(1cm,3cm)--cycle
25 c0: [stroke [circle 3bp]]
26 c1: [stroke [circle 5bp]]
30 [[shift [pth [pth t0].length + delta].p] c0]
32 [[shift ([pth t0] + delta).p] c1]
36 [[range '0 '15].foldsl
37 \ p e •st → ( p & [test 40*[random1D •st] 20cm*[random1D •st]] )
43 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
44 |** pth: [immerse [shift (4cm,0)] [] ../pth]
46 c0: [stroke [circle 3bp]]
47 c1: [stroke [circle 5bp]]
49 •page << view [] [stroke pth]
53 [[shift view [] [pth [pth t0].length + delta].p] c0]
55 [[shift view [] ([pth t0] + delta).p] c1]
59 [[range '0 '15].foldsl
60 \ p e •st → ( p & [test 40*[random1D •st] 20cm*[random1D •st]] )