The ‘‘Marshall–Huse–Elser’’ variational wave functions describe ordered planar (possibly noncollinear) ground states of s=1/2 Heisenberg spin-exchange Hamiltonians. We show how to generalize these wave functions to allow nonuniform states, arising from interactions which may be random and/or frustrated. In the Szi basis, the amplitude is exp[1/2H̃({Szi})] where the pseudo-Hamiltonian is given by H̃=−∑i2iθiSzi −(1/2)!∑ijKijSziSzj −(1/3!)∑ijkiLijkSzi SzjSzk. Here the classical ground-state directions {θi} (=0 or π in the Néel state) are found by minimizing an effective classical energy F=∑ij[Aij cos(θi−θj) +Bij cos2(θi−θj)], where (Aij,Jij) are functions of nearby Jij’s. Next, Kij and Lijk are taken to be functions of the values {Jij} and the angles {θi−θj}. The functions for Aij, Bij, Kij, and Lijk depend parametrically on a small set of variational parameters. Thus the dimension of parameter space does not grow with system size. We estimate the parameter values analytically, using the spin-wave approximation in a uniformly twisted square-lattice antiferromagnet. Also, the general form of the three-spin coefficient Lijk is roughly a sum of contributions ∝Jij sin(θi−θj), and j and k are both neighbors of spin i.