  We consider a perfectly conducting infinite cylinder with radius $R$, and
investigate the Casimir-Polder (CP) and van der Waals (vdW) interactions with a
neutral polarizable particle constrained to move in a plane distant $x_0>R$
from the axis of the cylinder. We show that when the relative curvature $x_0/R
\lesssim 6.44$, this particle, under the action of the lateral CP force (which
is the projection of the CP force onto the mentioned plane), is attracted to
the point on the plane which is closest to the cylinder surface. On the other
hand, when $x_0/R \gtrsim 6.44$, we also show that, for certain particle
orientations and anisotropy, the lateral CP force can move the particle away
from the cylinder. This repulsive behavior of such a component of the CP force
reveals a nontrivial dependence of the CP interaction with the surface
geometry, specifically of the relative curvature. In the vdW regime, we show
that a similar nontrivial repulsive behavior occurs, but for the relative
curvature $x_0/R \gtrsim 2.18$, which means that this effect requires a smaller
cylinder curvature in the vdW regime than in the CP one. In addition, we also
show that there are classical counterparts of these effects, involving a
neutral particle with a permanent electric dipole moment. The prediction of
such geometric effects on this force may be relevant for a better controlling
of the interaction between a particle and a curved surface in classical and
quantum physics.
