  Ultra Compact Dwarf Galaxies (UCDs) and dwarf galaxy nuclei have many common
properties, such as internal velocity dispersions and colour-magnitude trends,
suggesting tidally stripped dwarf galaxies as a possible UCD origin. However,
UCDs typically have sizes more than twice as large as nuclei at the same
luminosity. We use a GPU-enabled version of the particle-mesh code
\textsc{superbox} to study the possibility of turning nucleated dwarf galaxies
into UCDs by tidally stripping them in a Virgo-like galaxy cluster. We find
that motion in spherical potentials, where close passages happen many times,
leads to the formation of compact ($r_h \lesssim 20$ pc) star clusters/UCDs. In
contrast, orbital motion where close passages happen only once or twice leads
to the formation of extended objects which are large enough to account for the
full range of observed UCD sizes. For such motion, we find that dwarf galaxies
need close pericentre passages with distances less than 10 kpc to undergo
strong enough stripping so that UCD formation is possible. As tidal stripping
produces objects with similar properties to UCDs, and our estimates suggest
dwarf galaxies have been destroyed in sufficient numbers to explain the
observed number of UCDs in M87, we consider tidal stripping to be a likely
origin of UCDs. However, comparison with cosmological simulations is needed to
determine if the number and spatial distribution of UCDs formed by tidal
stripping matches the observations of UCDs in galaxy clusters.
