  This article concerns the dimension theory of the graphs of a family of
functions which include the well-known 'popcorn function' and its pyramid-like
higher-dimensional analogues. We calculate the box and Assouad dimensions of
these graphs, as well as the intermediate dimensions, which are a family of
dimensions interpolating between Hausdorff and box dimension. As tools in the
proofs, we use the Chung$\unicode{x2013}$Erd\H{o}s inequality from probability
theory, higher-dimensional Duffin$\unicode{x2013}$Schaeffer type estimates from
Diophantine approximation, and a bound for Euler's totient function. As
applications we obtain bounds on the box dimension of fractional Brownian
images of the graphs, and on the H\"older distortion between different graphs.
