 
 M: bubble-chamber pref-dim* ( gadget -- dim ) size>> ;
 
-M: bubble-chamber ungraft* ( bubble-chamber -- ) t >>paused drop ;
-
 : iterate-particle ( particle -- ) move ;
 
 M:: bubble-chamber update-frame-buffer ( BUBBLE-CHAMBER -- )

    drop ;

: large ( -- )
    bubble-chamber new
    { 600 600 } >>size
    randomize-collision-theta
    dup start-bubble-chamber-thread
    dup "Bubble Chamber" open-window

    550 [ <muon>   add-particle ] times


: iterate-system ( bubble-chamber -- ) drop ;

: <bubble-chamber> ( -- bubble-chamber )
    bubble-chamber new
        { 1000 1000 } >>size
        randomize-collision-theta
        dup '[ _ dup iterate-system relayout-1 ]
        f 10 milliseconds <timer> >>timer ;

: bubble-chamber-window ( -- bubble-chamber )
    <bubble-chamber> dup "Bubble Chamber" open-window ;

:: add-particle ( BUBBLE-CHAMBER PARTICLE -- bubble-chamber )
    PARTICLE BUBBLE-CHAMBER >>bubble-chamber drop
