aUCBLogo Demos and Tests / polarcircles
be polarcircles
t0=TimeFine
screen
grid
drawpolarcircles
xypoint
xaxis
yaxis
t=TimeFine
(pr t-t0 "seconds)
end
be grid
make "xsp 10
make "ysp 10
pu home setpc [0.8 0.8 0.8] setpensize [0 0]
for [y -500 500 :ysp]
[ pu setxy -500 :y pd setxy 500 :y
]
for [x -500 500 :xsp][pu setxy :x -500 pd setxy :x 500]
setpensize [3 3]
for [y -500 500 :ysp*10][pu setxy -500 :y pd setxy 500 :y]
for [x -500 500 :xsp*10][pu setxy :x -500 pd setxy :x 500]
pu home pd
end
be drawpolarcircles
pu home setpc [1 0.8 0] setpensize [0 0]
for [pc 0 500 10][pd ellipsearc 360 :pc :pc 0]
setpensize [3 3]
for [pc 0 500 100][pd ellipsearc 360 :pc :pc 0]
pu home pd
end
be screen
home cs WindowMode ;scrollx 0 scrolly 0 zoom 1
ht setpc [0 0 0] setsc [1 1 1] setpensize [0 0] pd
end
be xaxis
make "xsp 10
pu home seth 90 setpensize [3 3] setpc [0 0 1]
pd fd 500 bk 1000 home
for [x -500 500 :xsp][pu setxy :x -5 seth 0 pd fd 10]
pu home pd
end
be xypoint
pu home seth 45 setpc [0 0.7 0]
pd fd 200*sqrt 2
seth 0 setpc [0 0 1] bk 200 fd 200
seth 90 setpc [1 0 0] bk 200 fd 200
pu home pd
end
be yaxis
make "ysp 10
pu home seth 0 setpensize [3 3] setpc [1 0 0]
pd fd 500 bk 1000 home
for [y -500 500 :ysp][pu setxy -5 :y seth 90 pd fd 10]
pu home pd
end