aUCBLogo Demos and Tests / conetest
be conetest
t0=timefine
clearScreen
hideTurtle
; perspective
orthographic
disableDepthTest
disableLighting
; disableLineSmooth
setUpdateGraph false
setPenSize [0 0]
setPolygonMode 1
PenUp
be mandala center n size dangle
local [angle]
angle=0
be rotate
angle=angle+dangle
end
be draw
home
setPosXYZ center
spinx 45
spinz 45+angle
setPenColor HSBA size 1 1 1
repeat n
[ (cylinder size size/sqrt 2 0 0 360 sqrt 2 n)
spinz 360/n
]
end
end
m=(List
mandala [-207 0 0] 12 200 1
mandala [280 0 0] 18 300 2/3
mandala [0 100 0] 8 50 3
mandala [0 0 0] 6 100 -2
)
singleshot=Name? "framenr
i=0
if singleshot [i=10*framenr]
fps=0
while [not Key?]
[ t0=timefine
i=i+1
clearScreen
foreach m
[ ?'rotate
]
m.3'center=(List 0 100+20*(abs sin 3*i) 0)
foreach m
[ ?'draw
]
setPenColor "black
Label (se fps "fps)
updateGraph
t=timefine
fps=int 1/(t-t0)
if singleshot [break]
]
setPolygonMode 2
end