MWS/Unity Project/Assets/LSystem/Rose.txt

46 lines
989 B
Plaintext
Raw Normal View History

2021-09-16 19:40:48 +02:00
#ignore + - ^ &
#axiom
C(1,3)F(0,1)G
#rules
C(a,b) : a>=15 -> C(1,3)
C(a,b) > F(x,w) : b<3 -> C(a,b+1)
C(a,b) > F(x,w) : b>=3 -> C(a+1,0)
C(a,b) < F(x,w) : b>=3 -> F(a,w)
F(x,w) : x>0 -> F(0, w)
F(x,w) < F(y,w1) : x>0 -> F(x,w1)
F(x,w) < G : x<=3 -> #stochastic
p=1 ^G
p=1 &G
p=1 F(0,1)[+B]G
p=1 F(0,1)[+B]G
p=4 G
#stochastic end
F(x,w) < N : x>=1 ; x<3-> #stochastic
p=1 G
#stochastic end
F(x,w) < G : x>=3 ; x<5-> #stochastic
p=1 ^G
p=1 &G
p=1 F(0,1)[+B]G
p=1 F(0,1)[+B]G
p=1 F(0,1)[+F(0,1)G]G
p=1 F(0,1)[-F(0,1)G]G
p=4 G
#stochastic end
F(x,w) < G : x>=5 ; x<9-> #stochastic
p=1 F(0,1)W
#stochastic end
F(x,w) < W : x>=6 ; x<9-> #stochastic
p=1 N
#stochastic end
F(x,w) < G : x>=9 ; x<12-> #stochastic
p=1 N
#stochastic end
F(x,w) < B : x>=12 ; x<15-> #stochastic
p=1 N
#stochastic end
F(x,w) > [F(x1,w1)]F(x2,w2) -> F(x,(w1^2+w2^2)^(0.5))
F(x,w) > [F(x1,w1)][F(x2,w2)]F(x3,w3) -> F(x,(w1^2+w2^2+w3^2)^(0.5))
F(x,w) > F(x1,w1) -> F(x,w1)
F(x,w) > [B]F(x1,w1) -> F(x,w1)
#end rules