Step 2: The schematic
It doesn't use a capacitor for flattening the output voltage of the LM317T because the output signal is already perfect.
It's also dangerous to use because when you remove the diode, the capacitor will charge to higher voltages as allowed for the diode, and when you attach it again your diode will be destroyed.
We also don't use an inverse parallel diode because that's not required. Your LM317T can't give negative voltages. Even if it did, the laser diode is a diode which means it can take negative voltages (-2V).
And even if your LM317T would somehow create negative voltages, your diode would die anyway because it means the regulator is broken; no current regulation means dead diode. I don't see why people put diodes over there.
You can use a 9V battery or an external power input for this laser burner (choose between both with S1).
When using the battery, all is ok, but when you use the external input you should keep this in mind:
If your diode works at around 4V and your voltage source is 9V then the LM will have to dissipate the remaining 3.75V by converting it into heat.
Dissipating 5V is allright.
The LM is made to handle a maximum voltage of 40VDC. If you would do that, and your diode still works around 4V then your LM will have to convert the remaining 34.75V into heat. This is possible - with an epic heatsink - but we want to keep things compact right?
If you use a small heatsink and 40V input, then I ensure you your LM will be fried. (maximum junction temperature for the LM317T is 150°C, 302°F)
If you want to have an extra trim potentiometer for inside the casing, I suggest using a 50ohm potentiometer - 250mW.
D1 will be protecting our circuit from inverted polarity.
D2 is the laser diode.
R1 will protect R2 from being toasted (current limiter).
R2 is the potentiometer which will control the current trough D2.
Iadj is the adjustment current from the LM317T (see datasheet ).