aUCBLogo Demos and Tests / testplunger
to testplunger
setUpdateGraph false
clearScreen
PenUp
r=200
w=360
a=50
forever
[ for [t 0 1 0.001]
[ clearScreen
Home
setHeading w*t
PenDown
setPenColor HSB w 1 1
forward a
p=Pos
x0=p.1
y0=p.2
y=(sqrt (sqr r)-(sqr x0))+y0
setXY 0 y
setHeading 0
PenUp
dx0_dt= a*w*cos w*t
dy0_dt=-a*w*sin w*t
v=1/(sqrt (sqr r)-(sqr x0))*x0*dx0_dt+dy0_dt
;pr v
setXY 200 v/100
updateGraph
if Key? [break]
]
if Key? [break]
]
end