For high-speed and high-accuracy 3D shape measurement, it has been demonstrated that using 1-bit binary patterns is advantageous over 8-bit sinusoidal phase-shifted fringe patterns especially on the digital-light-processing (DLP) projection platform. By properly defocusing the projector for specific square binary patterns, researchers have achieved the speed breakthroughs for high-accuracy 3D shape measurement, yet such a method requires carefully adjustment of the projector’s lens to within a small out-of-focus range, limiting its depth measurement capability. Optimizations based on pulse width modulation (PWM), optimal pulse width modulation (OPWM), and dithering/halftoning have substantially improved measurement quality, yet they only work well for a limited range of fringe period variations especially when a small number of phase-shifted fringe patterns are used. This paper proposes to generate high-quality phase using two sets of three phase-shifted binary patterns: the first set is generated by triangular pulse width modulation (TPWM) technique, and the second set being p shifted from the first set is also generated by TPWM technique. A three-step phase-shifting algorithm is then applied to compute the phase. Through optimizing the modulation frequency of the carrier signal, our simulation and experimental results demonstrate that high-quality phase can be generated for a wide range of fringe periods (e.g., from 18 to 1140 pixels) with only six binary patterns.