Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (26 sloc) 461 Bytes
# contributed by monkstone
load_library 'context_free'
def setup
@triangle = ContextFree.define do
rule :tri do
circle
triangle :brightness => 0
circle :brightness => 10, :size => 0.02
end
end
size 200, 200
color_mode HSB, 1.0
smooth
draw_it
# save_frame("tri.png")
end
def draw_it
background 1.0
@triangle.render :tri, :size => height/2
end
def draw
# Do nothing.
end
def mouse_clicked
draw_it
end