REBOL [ Title: "Bubbles" Author: "Gabriele Santilli" Version: 1.0.1 Needs: [view 1.3.1] ] bubbles: [] d: [pen 80.80.255.175] random/seed now rand: func [v] [random/secure v] rnd-pair: does [as-pair rand 400 rand 400] move-bubble: func [bubble] [ bubble/1/x: bubble/1/x - 3 + rand 5 bubble/1/y: bubble/1/y - 2 - rand 6 if bubble/1/y < 24 [bubble/1/y: 428] bubble/-10: bubble/1 - (bubble/2 / 3) ] loop 100 [ insert insert bbl: insert tail d [ fill-pen radial 150x150 30 150 0 1 1 128.128.255.105 90.90.255.165 80.80.255.175 circle ] rnd-pair 4 + rand 20 bbl/-8: bbl/2 bbl/-9: bbl/2 * 0.2 bbl/-10: bbl/1 - (bbl/2 / 3) insert/only tail bubbles bbl ] view/new center-face layout/tight [b: box 400x400 effect [gradient 0x-1 0.0.100 10.10.255 draw d]] b/feel/engage: none check-close: does [wait 0 if empty? system/view/screen-face/pane [quit]] forever [ foreach bubble bubbles [move-bubble bubble] show b check-close ]