  Hypothesis: Understanding contact angle hysteresis on rough surfaces is
important as most industrially relevant and naturally occurring surfaces
possess some form of random or structured roughness. We hypothesise that
hysteresis originates from the energy dissipation during the
$\textit{stick-slip}$ motion of the contact line and that this energy
dissipation is key to developing a predictive equation for hysteresis.
  Experiments: We measured hysteresis on surfaces with randomly distributed and
periodically arranged microscopic cylindrical pillars for a variety of
different liquids in air. The inherent (flat surface) contact angles tested
range from lyophilic ($\theta_{\rm{e}}=33.8^{\circ}$) to lyophobic
($\theta_{\rm{e}} = 112.0^{\circ}$).
  Findings: A new methodology for calculating the average advancing and
receding contact angles on random surfaces is presented. Also, the correlations
for roughness-induced energy dissipation were derived, and a predictive
equation for the advancing and receding contact angles during homogeneous
(Wenzel) wetting on random surfaces is presented. Significantly, equations that
predict the onset of the alternate wetting conditions of hemiwicking,
split-advancing, split-receding and heterogeneous (Cassie) wetting are also
derived, thus defining the range of validity for the derived homogeneous
wetting equation. A novel feature 'cluster' concept is introduced which
explains the measurably higher hysteresis exhibited by structured surfaces
compared to random surfaces observed experimentally.
