_Title "Swinging Reverse" 'b+ 2021-04-13
_Delay .25 'need time for screen to load before attempting to move it. xs = 4: dx = -.1
RotoZoom3 xc, yc, r&, xs, 4, 0
xs = xs + dx
If xs
< -4 Then xs
= -4: dx
= -dx
If xs
> 4 Then xs
= 4: dx
= -dx
Dim W&
, H&
, sinr!
, cosr!
, i&
, x2&
, y2&
px(0) = -W& / 2: py(0) = -H& / 2: px(1) = -W& / 2: py(1) = H& / 2
px(2) = W& / 2: py(2) = H& / 2: px(3) = W& / 2: py(3) = -H& / 2
sinr!
= Sin(-radianRotation
): cosr!
= Cos(-radianRotation
) x2& = xScale * (px(i&) * cosr! + sinr! * py(i&)) + X: y2& = yScale * (py(i&) * cosr! - px(i&) * sinr!) + Y
px(i&) = x2&: py(i&) = y2&