Handbook
Glossary
muon
Vocabulary
bubble-chamber
Definition
IN:
bubble-chamber
TUPLE:
muon
<
particle
;
Methods
USING:
accessors
bubble-chamber
kernel
math
random
ranges
;
M:
muon
collide
dup
center
>>pos
2 32
[a..b]
random
>>speed
0.0001 0.001
2random
>>speed-d
dup
collision-theta
-0.1 0.1
2random
+
>>theta
0
>>theta-d
0
>>theta-dd
[
0.001
theta-dd-small?
]
[
-0.1 0.1
random-theta-dd
]
while
set-good-color
set-anti-color
drop
;
USING:
accessors
arrays
bubble-chamber
colors
kernel
math
math.functions
math.vectors
namespaces
processing.shapes
sequences
;
M::
muon
move
( MUON -- )
MUON
bubble-chamber>>
size>>
first
:>
WIDTH MUON
dup
myc>>
>rgba-components
drop
0.16
<rgba>
stroke-color
set
dup
pos>>
draw
dup
mya>>
>rgba-components
drop
0.16
<rgba>
stroke-color
set
dup
pos>>
first2
[
WIDTH
swap
-
]
dip
2array
draw
dup
[
speed>>
]
[
theta>>
[
sin
]
[
cos
]
bi
2array
]
bi
n*v
move-by
step-theta
step-theta-d
step-speed-sub
dup
out-of-bounds?
[
collide
]
[
drop
]
if
;