/// ********* File = direzione-1.clsr ************ /// Questa opera è pubblicato sotto una Licenza Creative Commons /// http://creativecommons.org/licenses/by-nc-sa/2.5/it/ srand(1298990597) $minl=0.8 $maxl=1.2 $mind=1 $maxd=1.8 define model:modSquare4([!xxa,!xxb,!xxc,!xxd],[&r1,&r2,&r3,&r4,&rd]) { &r1(!xxa,!xxb) &r2(!xxb,!xxc) &r3(!xxc,!xxd) &r4(!xxd,!xxa) &rd(!xxa,!xxc) } define form:quad(!xxa,!xxb,!xxc,!xxd) { &(!xxa,!xxb) &(!xxb,!xxc) &(!xxc,!xxd) &(!xxd,!xxa) } define form:ftris(!xxa,!xxb,!xxc) { &(!xxa,!xxb) &(!xxb,!xxc) &(!xxc,!xxa) } define function:fn(!$a,!$b) { $r1=rand($minl,$maxl) $r2=rand($minl,$maxl) $r3=rand($minl,$maxl) $r4=rand($minl,$maxl) $rd=rand($mind,$maxd) &r1($r1) &r2($r2) &r3($r3) &r4($r4) &rd($rd) !$c=!$$ !$d=!$$ I[]=model:modSquare4([!$a,!$b,!$c,!$d],[&r1,&r2,&r3,&r4,&rd]) form:quad(!$a,!$b,!$c,!$d) remove(&r1,&r2,&r3,&r4,&rd) return I[] } define model:tris(!a,!b,!c) { &rr(!a,!b) &rr(!b,!c) &rr(!c,!a) } !a !b &rr(!b,!c) &rr(!c,!d) &rr(!d,!e) &rr(!e,!f) &rk2(!a,!b,!e,!f) &rk2(!a,!k11,!k12,!b) &rk2(!b,!k21,!k22,!c) &rk2(!c,!k31,!k32,!d) &rk2(!d,!k41,!k42,!e) &rk2(!e,!k51,!k52,!f) model:tris(!a,!b,!k) &rfre(!a,!k11,!k12,!b,!k) //remove(!k11,!k2,!k) define function:fn2(!$a,!$b,$col) { @GRFILL($col) I[]=fun:fn(!$b,!$a) :I[$a,$b,$c,$d] $col=$col + 0x0C0C0C @GRFILL($col) I[]=fun:fn(!$d,!$c) :I[$a,$b,$c,$d] $col=$col + 0x0C0C0C @GRFILL($col) I[]=fun:fn(!$d,!$c) :I[$a,$b,$c,$d] $col=$col + 0x0C0C0C @GRFILL($col) I[]=fun:fn(!$d,!$c) :I[$a,$b,$c,$d] $col=$col + 0x0C0C0C @GRFILL($col) I[]=fun:fn(!$d,!$c) :I[$a,$b,$c,$d] $col=$col + 0x0C0C0C @GRFILL($col) I[]=fun:fn(!$d,!$c) :I[$a,$b,$c,$d] $col=$col + 0x0C0C0C @GRFILL($col) I[]=fun:fn(!$d,!$c) :I[$a,$b,$c,$d] $col=$col + 0x0C0C0C @GRFILL($col) I[]=fun:fn(!$d,!$c) :I[$a,$b,$c,$d] $col=$col + 0x0C0C0C @GRFILL($col) I[]=fun:fn(!$d,!$c) :I[$a,$b,$c,$d] $col=$col + 0x0C0C0C @GRFILL($col) I[]=fun:fn(!$d,!$c) :I[$a,$b,$c,$d] $col=$col + 0x0C0C0C @GRFILL($col) I[]=fun:fn(!$d,!$c) :I[$a,$b,$c,$d] $col=$col + 0x0C0C0C @GRFILL($col) I[]=fun:fn(!$d,!$c) :I[$a,$b,$c,$d] $col=$col + 0x0C0C0C @GRFILL($col) I[]=fun:fn(!$d,!$c) :I[$a,$b,$c,$d] $col=$col + 0x0C0C0C @GRFILL($col) I[]=fun:fn(!$d,!$c) :I[$a,$b,$c,$d] $col=$col + 0x0C0C0C @GRFILL($col) I[]=fun:fn(!$d,!$c) :I[$a,$b,$c,$d] $col=$col + 0x0C0C0C @GRFILL($col) I[]=fun:fn(!$d,!$c) :I[$a,$b,$c,$d] $col=$col + 0x0C0C0C @GRFILL($col) I[]=fun:fn(!$d,!$c) :I[$a,$b,$c,$d] $col=$col + 0x0C0C0C @GRFILL($col) I[]=fun:fn(!$d,!$c) :I[$a,$b,$c,$d] $col=$col + 0x0C0C0C &rfre(!$kk1,!$d,!$c,!$kk2,!$kk3) form:ftris(!$kk1,!$kk2,!$kk3) } $col=0X447744 fun:fn2(!k11,!k12,$col) fun:fn2(!k21,!k22,$col) fun:fn2(!k31,!k32,$col) fun:fn2(!k41,!k42,$col) fun:fn2(!k51,!k52,$col)