The tilted-pulse-front setup utilizing a diffraction grating is one of the most successful methods to generate single-to few-cycle terahertz pulses. However, the generated terahertz pulses have a large spatial inhomogeneity, due to the noncollinear phase matching condition and the asymmetry of the prism-shaped nonlinear crystal geometry, especially when pushing for high optical-to-terahertz conversion efficiency. A 3D+1 (x,y,z,t) numerical model is necessary in order to fully investigate the terahertz generation problem in the tilted-pulse-front scheme. We compare in detail the differences between 1D+1, 2D+1 and 3D+1 models. The simulations show that the size of the optical beam in the pulse-front-tilt plane sensitively affects the spatio-temporal properties of the terahertz electric field. The terahertz electric field is found to have a strong spatial dependence such that a few-cycle pulse is only generated near the apex of the prism. The part of the beam farther from the apex contains a large fraction of the energy but has a waveform that deviates from a few-cycle. This strong spatial dependence must be accounted for when using the terahertz pulses for strong-field physics and carrier-envelope-phase sensitive experiments such as terahertz acceleration, coherent control of antiferromagnetic spin waves and terahertz high-harmonic generation. arXiv:1908.09581v1 [physics.optics]