Relay circuit with MOC3021 and BT136
If you have a resistive load, you only need one resistor in series with the triac. R1 is chosen for the minimum line voltage at which you require the triac to turn-on. 10V might be a typical specification, this means that you can never get 180 degrees conduction, the triac isn't guaranteed to turn-on until you have met the minimum gate current. Note that for most conduction angles, R1 only conducts a large current momentarily, when the triac turns on, the voltage is reduced to about 0.7V.
For an inductive load, you need to hold the gate current until current flows in the triac (M1-M2). The inductive load will cause the M1-M2 current to lag. C2 is chosen to hold the gate current long enough for the M1-M2 current to meet the minimum hold current. Note that loads are rarely purely inductive. The value of R4 needs to be low enough so the voltage on C2 follows the line fairly closely.
onsemi.com/pub/Collateral/AN-3003.pdf.pdf



simulate this circuit &ndash; Schematic created using CircuitLab