  One of the fundamental problems in shape analysis is to align curves or
surfaces before computing geodesic distances between their shapes. Finding the
optimal reparametrization realizing this alignment is a computationally
demanding task, typically done by solving an optimization problem on the
diffeomorphism group. In this paper, we propose an algorithm for constructing
approximations of orientation-preserving diffeomorphisms by composition of
elementary diffeomorphisms. The algorithm is implemented using PyTorch, and is
applicable for both unparametrized curves and surfaces. Moreover, we show
universal approximation properties for the constructed architectures, and
obtain bounds for the Lipschitz constants of the resulting diffeomorphisms.
