  The worldline formalism is a useful scheme in quantum field theory which has
also become a powerful tool for numerical computations. The key ingredient in
this formalism is the first quantization of an auxiliary point-particle whose
transition amplitudes correspond to the heat-kernel of the operator of quantum
fluctuations of the field theory. However, to study a quantum field which is
confined within some boundaries one needs to restrict the path integration
domain of the auxiliary point-particle to a specific subset of worldlines
enclosed by those boundaries. We show how to implement this restriction for the
case of a scalar field confined to the $D$-dimensional ball under Dirichlet and
Neumann boundary conditions, and compute the first few heat-kernel coefficients
as a verification of our construction. We argue that this approach could admit
different generalizations.
