#!/usr/koeki/bin/ruby -Ke require 'tk' TkCanvas.new {|c| width(400) height(400) cx, cy = c.width/2, c.height/2 r = 100 ovl = TkcOval.new(c, cx-r, cx-r, cx+r, cy+r, 'fill'=>'yellow', 'outline'=>'black') Thread.new { while true r = (r+8)%(width/2) ovl.coords(cx-r, cx-r, cx+r, cy+r) sleep 0.0001 end } }.pack TkButton.new("text"=>'quit', 'command'=>'exit').pack Tk.mainloop