Terahertz (THz) communication can offer terabit-per-second rates in future wireless systems, thanks to the ultra-wide bandwidths, but require large antenna arrays. As antenna apertures expand and we enter the near-field scenarios, the conventional binary classification of communication links as either Line-of-Sight (LoS) or Non-Line-of-Sight (NLoS) becomes insufficient. Instead, quasi-LoS scenarios, where the LoS path is partially obstructed, are increasingly prevalent, posing significant challenges for traditional LoS focusing and steering beams. The Airy beam serves as a promising alternative, utilizing its non-diffracting and curved trajectory properties to mitigate such blockages. However, while existing electromagnetics literature primarily explores their physical patterns without practical generation schemes, recent communication-oriented designs predominantly rely on learning-based frameworks lacking interpretable closed-form solutions. To address this issue, this paper investigates a closed-form Airy beam design to efficiently synthesize Airy beam phase profiles based on the positions of the transceivers and obstacles. Specifically, rigorous analytical derivations of the electric field and trajectory are presented to establish a deterministic closed-form design for ULA Airy beamforming. Leveraging 3D wavefront separability, this framework is extended to uniform planar arrays (UPAs) with two operation modes: the hybrid focusing-Airy mode and the dual Airy mode. Simulation results verify the effectiveness of our derived trajectory equations and demonstrate that the proposed closed-form design significantly outperforms conventional beamforming schemes in quasi-LoS scenarios. Furthermore, the proposed method achieves performance comparable to exhaustive numerical searches with low computational complexity and enhanced physical interpretability.