  We construct convex functions on $\mathbb{R}^3$ and $\mathbb{R}^4$ that are
smooth solutions to the Monge-Amp\`{e}re equation $\det D^2u = 1$ away from
compact one-dimensional singular sets, which can be Y-shaped or form the edges
of a convex polytope. The examples solve the equation in the Alexandrov sense
away from finitely many points. Our approach is based on solving an obstacle
problem where the graph of the obstacle is a convex polytope.
