pouët.net

Go to bottom

Plant by Rudi

0 rem *** Plant by Rudi - 22.06.2019 ***
5 rem *** takes approx 500 million lightyears to compute ***
10 dimf(3,5),p(3)
15 fori=0to3:readq:p(i)=q:next:fore=0to3:fort=0to5:readq:f(e,t)=q:next:next
20 poke53272,29:poke53265,59:fori=0to8000:poke8192+i,0:next:poke53280,0
25 g=0:h=5:rem g=background color, h=plant color
30 fori=1024to2023:pokei,g+(h*16):next
35 x=0.5:y=0.5:a=p(0):b=p(1)+a:c=p(2)+b:d=p(3)+c
40 r=rnd(1)
50 if(r<=d)theni=3:if(r<=c)theni=2:if(r<=b)theni=1:if(r<=a)theni=0
60 m=(f(i,0)*x)+(f(i,1)*y)+f(i,4):n=(f(i,2)*x)+(f(i,3)*y)+f(i,5)
70 x=m:y=n:u=(y*320)/11:v=((x+4)*200)/8
80 mem=8192+int(v/8)*320+int(u/8)*8+(vand7):pokemem,peek(mem)or2^(7-(uand7))
90 goto 40
100 data 0.01, 0.85, 0.07, 0.07 : rem probabilities
110 data 0.0, 0.0, 0.0, 0.16, 0.0, 0.0 : rem transformations
120 data 0.83, -0.02, -0.04, 0.85, 0.0, 1.6
130 data 0.2, -0.26, 0.23, 0.22, 0.0, 1.6
140 data -0.15, 0.28, 0.26, 0.24, 0.0, 0.44





 

Go to top