  Recently, a method based on stochastic quantization has been proposed to
compute the Casimir force and its fluctuations in arbitrary geometries. It
relies on the spectral decomposition of the Laplacian operator in the given
geometry. Both quantum and thermal fluctuations are considered. Here we use
such method to compute the Casimir force on the plates of a finite piston of
arbitrary cross section. Asymptotic expressions valid at low and high
temperatures and short and long distances are obtained. The case of a piston
with triangular cross section is analysed in detail. The regularization of the
divergent stress tensor is described.
