Handbook
Glossary
move ( particle -- )
Vocabulary
bubble-chamber
Inputs
particle
an
object
Outputs
None
Definition
IN:
bubble-chamber
GENERIC:
move
( particle -- )
Methods
USING:
accessors
bubble-chamber
colors.gray
kernel
math
namespaces
processing.shapes
random
ranges
sequences
;
M:
axion
move
T{
gray
{
gray 0.06
}
{
alpha 0.59
}
}
stroke-color
set
dup
pos>>
draw
4
[1..b]
[
axion-white
axion-point-
]
each
4
[1..b]
[
axion-black
axion-point+
]
each
dup
vel>>
move-by
turn
step-theta
step-theta-d
step-speed-mul
[
]
[
speed-d>>
0.9999
*
]
bi
>>speed-d
1000
random
996
>
[
dup
speed>>
neg
>>speed
dup
speed-d>>
neg
2
+
>>speed-d
100
random
30
>
[
collide
]
[
drop
]
if
]
[
drop
]
if
;
USING:
accessors
bubble-chamber
colors.gray
kernel
math
math.points
namespaces
processing.shapes
random
;
M:
hadron
move
T{
gray
{
gray 1
}
{
alpha 0.11
}
}
stroke-color
set
dup
pos>>
1
v-y
draw
T{
gray
{
gray 0
}
{
alpha 0.11
}
}
stroke-color
set
dup
pos>>
1
v+y
draw
dup
vel>>
move-by
turn
step-theta
step-theta-d
step-speed-mul
1000
random
997
>
[
1.0
>>speed-d
0.00001
>>theta-dd
100
random
70
>
[
dup
collide
]
when
]
when
dup
out-of-bounds?
[
collide
]
[
drop
]
if
;
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
;
USING:
accessors
arrays
bubble-chamber
colors
kernel
math
namespaces
processing.shapes
random
sequences
;
M::
quark
move
( QUARK -- )
QUARK
bubble-chamber>>
size>>
first
:>
WIDTH QUARK
dup
myc>>
>rgba-components
drop
0.13
<rgba>
stroke-color
set
dup
pos>>
draw
dup
pos>>
first2
[
WIDTH
swap
-
]
dip
2array
draw
[
]
[
vel>>
]
bi
move-by
turn
step-theta
step-theta-d
step-speed-mul
1000
random
997
>
[
dup
speed>>
neg
>>speed
2
over
speed-d>>
-
>>speed-d
]
when
dup
out-of-bounds?
[
collide
]
[
drop
]
if
;