Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
25
Task/Polyspiral/Yabasic/polyspiral.basic
Normal file
25
Task/Polyspiral/Yabasic/polyspiral.basic
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
w = 1024 : h = 600
|
||||
open window w, h
|
||||
color 255,0,0
|
||||
|
||||
incr = 0 : twopi = 2 * pi
|
||||
|
||||
while true
|
||||
incr = mod(incr + 0.05, twopi)
|
||||
x1 = w / 2
|
||||
y1 = h / 2
|
||||
length = 5
|
||||
angle = incr
|
||||
|
||||
clear window
|
||||
|
||||
for i = 1 to 151
|
||||
x2 = x1 + cos(angle) * length
|
||||
y2 = y1 + sin(angle) * length
|
||||
line x1, y1, x2, y2
|
||||
x1 = x2 : y1 = y2
|
||||
length = length + 3
|
||||
angle = mod(angle + incr, twopi)
|
||||
next
|
||||
pause 1
|
||||
end while
|
||||
Loading…
Add table
Add a link
Reference in a new issue