We present a method to compute the medial axis of a smooth curve or surface by using PHT-spline (polynomial splines over hierarchical T-meshes) hierarchical approximation. In particular, we focus on closed parametric curves in the plane and implicitly defined surfaces in space. A mesh of the medial axis of the given boundary is obtained by applying suitable thinning and smoothing algorithms to the deepest level of the hierarchical T-mesh.