Handbook
Glossary
axion
Vocabulary
bubble-chamber
Definition
IN:
bubble-chamber
TUPLE:
axion
<
particle
;
Methods
USING:
accessors
bubble-chamber
kernel
math
math.constants
;
M:
axion
collide
dup
center
>>pos
2
pi
*
1random
>>theta
1.0 6.0
2random
>>speed
0.998 1.0
2random
>>speed-d
0
>>theta-d
0
>>theta-dd
[
0.00001
theta-dd-small?
]
[
-0.001 0.001
random-theta-dd
]
while
drop
;
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
;