| |
|
|
 p.specht
 |
Windowtitle "SPIRALO - Ein rekursiver Spiralalgorithmus"
Windowstyle 24:Window 0,0-%maxx,%maxy:randomize
Declare xh&,yh&,x!,y!,xn!,yn!,r!,s!,co&
Repeat:r!=width(%hwnd):s!=pi()/180
xh&=rnd(width(%hwnd)):yh&=rnd(height(%hwnd))
x!=r!:moveto xh&+x!,yh&:co&=rnd(8^8):usepen 0,10,co&
go
until %key=27:end
proc go
if r!>4:s!=s!+sqrt(s!)*0.004:usepen 0,20-38*s!,co&
xn!=x!*cos(s!)+y!*sin(s!):yn!=y!*cos(s!)-x!*sin(s!)
xn!=xn!*0.985:yn!=yn!*0.985:r!=r!*0.985
'locate 1,1:print r!,xn!,yn!
line xh&+x!,(yh&-y!) - xh&+xn!,(yh&-yn!)
x!=xn!:y!=yn!
if rnd(100)<20:waitinput 1:case %key>0:END:endif
go'REKURSION!
endif
endproc
|
|
|
| XProfan 11Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'... | 18.05.2021 ▲ |
|
|
|