Ruby | Sketch ~upd~
on :mouse_down do |event| Circle.new(x: event.x, y: event.y, radius: 10, color: 'fuchsia') @points << [event.x, event.y] end
update do @x += 2 @square.x = @x @square.x = 0 if @x > 500 end ruby sketch
show require 'ruby2d' set title: "Interactive Sketch" on :mouse_down do |event| Circle
(0...800).each do |x| (0...600).each do |y| # Mandelbrot or pattern color = ((x ^ y) % 256) png[x, y] = ChunkyPNG::Color.rgb(color, color, color) end end on :mouse_down do |event| Circle.new(x: event.x