Handbook
Glossary
random-boids-in ( count dim -- boids )
Vocabulary
boids
.
simulation
Inputs
count
an
integer
dim
a
sequence
Outputs
boids
a
sequence
Word description
Creates a flock with positions inside the given dimensions and random velocities. Integer extents are clamped to at least one.
Definition
USING:
math
math.order
random
sequences
;
IN:
boids.simulation
:
random-boids-in
( count dim -- boids )
'[
_
[
>integer
1
max
random
]
map
2
[
0 1
normal-random
]
replicate
<boid>
]
replicate
;