■
<? num=1 t = obj.frame x0_init=180.5 x0_interval = 70.5 x0 = x0_init - (num-1)*x0_interval y0 = -404.95 vx0 = 2.62 vy0 = 0.072 g = 0.033 e = 0.9257 A = 356.59 L = 214.86 x = x0 + vx0 * t while math.abs(x) > L do if x > L then x = 2*L-x else x = -2*L-x end end vy1 = math.sqrt(vy0^2 + 2 * g * (A-y0)) T1 = ( vy1-vy0) / g if t<T1 then y=y0+vy0*t+g*t^2/2 else y = A - e * vy1 * (t - T1) + g * (t - T1)^2 / 2 end obj.load("figure", "円", 0xffff00, 70, 4) obj.draw(x-obj.x, y-obj.y) ?>