cfdg.models.spirales: Use new macros

db4
Eduardo Cavazos 2008-08-06 19:12:57 -05:00
parent 930ec70c75
commit 8aef8fda25
1 changed files with 7 additions and 21 deletions

View File

@ -7,33 +7,19 @@ DEFER: line
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: block ( -- )
[
[ circle ] do
[ 0.3 s 60 flip line ] do
]
recursive ;
: block ( -- ) { [ circle ] [ 0.3 s 60 flip line ] } rule ;
: a1 ( -- )
[
[ 0.95 s 2 x 12 r 0.5 b 10 hue 1.5 sat a1 ] do
[ block ] do
]
recursive ;
: a1 ( -- ) { [ 0.95 s 2 x 12 r 0.5 b 10 hue 1.5 sat a1 ] [ block ] } rule ;
: line ( -- )
-0.3 a
[ 0 rotate a1 ] do
[ 120 rotate a1 ] do
[ 240 rotate a1 ] do ;
: line ( -- ) -0.3 a { [ 0 r a1 ] [ 120 r a1 ] [ 240 r a1 ] } rule ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: init ( -- )
[ -1 b ] >background
{ -20 40 -20 40 } viewport set
[ line ] >start-shape
0.03 >threshold ;
[ -1 b ] >background
{ -20 40 -20 40 } >viewport
[ line ] >start-shape
0.04 >threshold ;
: run ( -- ) [ init ] cfdg-window. ;