From 5662d5fda637e9b1791f0cd651cec21daf48bb5e Mon Sep 17 00:00:00 2001 From: Eduardo Cavazos Date: Mon, 15 Dec 2008 19:50:25 -0600 Subject: [PATCH] bubble-chamber: Add small, medium, and large configurations like those on the complexification web site --- extra/bubble-chamber/bubble-chamber.factor | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/extra/bubble-chamber/bubble-chamber.factor b/extra/bubble-chamber/bubble-chamber.factor index d88c53c99f..7fe80ba138 100644 --- a/extra/bubble-chamber/bubble-chamber.factor +++ b/extra/bubble-chamber/bubble-chamber.factor @@ -504,6 +504,16 @@ M:: update-frame-buffer ( BUBBLE-CHAMBER -- ) : big-bang ( bubble-chamber -- bubble-chamber ) dup particles>> [ collide ] each ; +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +: collide-one-of-each ( bubble-chamber -- bubble-chamber ) + dup + particles>> + [ [ ? ] filter random collide ] + [ [ ? ] filter random collide ] + [ [ ? ] filter random collide ] + tri ; + ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! Some initial configurations ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -538,6 +548,60 @@ M:: update-frame-buffer ( BUBBLE-CHAMBER -- ) big-bang drop ; +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +: small ( -- ) + new-gadget + { 200 200 } >>size + randomize-collision-theta + dup start-bubble-chamber-thread + dup "Bubble Chamber" open-window + + 42 [ muon add-particle ] times + 30 [ quark add-particle ] times + 21 [ hadron add-particle ] times + 7 [ axion add-particle ] times + + collide-one-of-each + + drop ; + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +: medium ( -- ) + new-gadget + { 400 400 } >>size + randomize-collision-theta + dup start-bubble-chamber-thread + dup "Bubble Chamber" open-window + + 100 [ muon add-particle ] times + 81 [ quark add-particle ] times + 60 [ hadron add-particle ] times + 9 [ axion add-particle ] times + + collide-one-of-each + + drop ; + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +: large ( -- ) + new-gadget + { 600 600 } >>size + randomize-collision-theta + dup start-bubble-chamber-thread + dup "Bubble Chamber" open-window + + 550 [ muon add-particle ] times + 339 [ quark add-particle ] times + 100 [ hadron add-particle ] times + 11 [ axion add-particle ] times + + collide-one-of-each + + drop ; + ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! Experimental ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -575,3 +639,6 @@ M:: update-frame-buffer ( BUBBLE-CHAMBER -- ) 111 [ axion add-particle ] times dup particles>> [ collide randomize-collision-theta ] each drop ; + +! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +