Synthesis of light needles with tunable length and nearly constant irradiance