Screen = require("screen") local brush, s, w, h function _init() scrn = Screen:new(_FILE, 10, 4) w, h = view.size(scrn.mainvp) scrn:autocolor() s = 8 for a = 0, 360 do gfx.line(s, s, s + math.sin(a) * s, s + math.cos(a) * s) end brush = image.new(s * 2, s * 2, 1) image.copy(brush, 0, 0, 0, 0, s * 2, s * 2) gfx.cls() image.copymode(12) sys.stepinterval(1000 / 60) end function _step(t) t = t / 500 image.draw( brush, w * 0.5 + math.sin(t * 1) * w * 0.5 - s, h * 0.5 + math.cos(t * math.pi) * h * 0.5 - s, 0, 0, s * 2, s * 2 ) if input.hotkey() == "q" then sys.exit() end scrn:step() end