This paper studies deterministic sensor deployment to ensure barrier coverage in wireless sensor networks. Most of existing work focused on line-based deployment, ignoring a wide spectrum of potential curve-based solutions. We, for the first time, extensively study the sensor deployment under general settings. We first present a condition under which line-based deployment is suboptimal, pointing to the advantage of curve-based deployment. By constructing a contracting mapping, we identify the characteristics for a deployment curve to be optimal. We then design sensor deployment algorithms for the optimal deployment curve by introducing a new notion of distance-continuous. Our findings show that i) when the deployment curve is distance-continuous, the proposed algorithm is optimal in terms of the vulnerability corresponding to the deployment, and ii) when the deployment curve is not distance-continuous, the approximation ratio of the vulnerability corresponding to the deployment by the proposed algorithm to the optimal one is upper bounded by min (π, & Verbar;AB & Verbar;/ & Verbar;AGB & Verbar; 2n+√2-1/2n), whereAB, AGB and n are constants. Extensive numerical results corroborate our analysis.