newbie "is there an easier way to do this?"
Posted: Fri Jul 20, 2007 2:31 pm
Is it possible to shorten my code?
Sorry, but I don't know how to post an image, and this code takes a few minutes to parse on my PC...
Sorry, but I don't know how to post an image, and this code takes a few minutes to parse on my PC...
Code: Select all
/*
Cathedral Glass
Mark Baldwin
cathedralglass.cfdg
*/
startshape CROSS
background { b -1 }
rule CROSS {
6* { r 60 } BOXES {}
}
rule BOXES {
BOX5 {}
WHIRL4 {}
WHIRL4 { r 90 }
}
rule WHIRL4 {
WHIRL3 {}
WHIRL3 { flip 90 }
}
rule WHIRL3 {
WHIRL2 {}
WHIRL2 { flip 180 }
}
rule WHIRL2 {
WHIRL1 {}
WHIRL2 { y 0.95 s 0.9 r -2 }
}
rule WHIRL1 {
CIRCLE { s 2 hue 220 sat 1 b 0.5 }
CIRCLE { s 1.95 hue 190 sat 0.5 b 1 }
WHIRL1 { s 1 0.8 }
}
rule BOX5 {
BOX4 {}
BOX5 { flip 45 s 0.9 }
}
rule BOX4 {
BOX3 {}
BOX3 { flip 90 }
}
rule BOX3 {
BOX2 {}
BOX2 { flip 180 }
}
rule BOX2 {
BOX1 {}
BOX2 { y 0.95 s 0.9 r -2 }
}
rule BOX1 {
SQUARE { hue 0 sat 1 b 0.5 }
SQUARE { s 0.95 hue 50 sat 0.5 b 1 }
BOX1 { s 0.9 r 5 }
}