rem dragon scale =1.5 phi=1.618 gr.open 255,0,0,0 gr.screen w,h gr.color 255,255,255,255 gr.bitmap.create bmp,w,h x=w/3.5 y=h/3.5 angle=pi()*0.7 !calc dragon list$="FX+" !itirations form=0 to 13 list2$="" col=0.1 num=0 forn=1 to len(list$) read$= mid$(list$,n,1) if read$="F" then list2$=list2$+"F" if read$="+" then list2$=list2$+"+" if read$="-" then list2$=list2$+"-" if read$="X" then list2$=list2$+"X+YF" if read$="Y" then list2$=list2$+"FX-Y" next n list$=list2$ next m !draw dragon angle=angle-(pi()/180)*100.12019975 forn=1 to len(list$) gr.bitmap.drawinto.start bmp read$= mid$(list$,n,1) gr.set.antialias 0 gr.set.stroke 0 if read$="+" then scale=scale/phi for a=1 to 10 num=num+1 col=num*phi angle =angle+((pi()/180)* 7.987980025) ox=x oy=y x=ox+sin(angle)*scale y=oy+cos(angle)*scale gr.color 255,abs(cos(col)*155)+100,abs(sin(col))*155+100,abs(sin(col)*155)+100 gr.line ln,ox,oy,x,y next a end if if read$="-" then scale=scale*phi for a=1 to 10 num=num+1 col=num*phi angle =angle-((pi()/180)*7.987980025) ox=x oy=y x=ox+sin(angle)*scale y=oy+cos(angle)*scale gr.color 255,abs(cos(col)*255),abs(sin(col))*255,abs(sin(col)*255) gr.line ln,ox,oy,x,y next a end if gr.bitmap.drawinto.end gr.cls gr.bitmap.draw b,bmp,0,0 !gr.render next n gr.render gr.bitmap.save b,"dragon" do until 0