The above circuit by Aaron is NOT possible!
The sine wave graph is also not correct!!
Reason, simple.
current at 2.2K resistor is 230*√2/2200 =0.1478496 A
Heat produced at 2.2K resistor is 0.1478496^2 * 2200 =48 WATT !!!
The graph of zero cross is not correct either, because diode generally drops 0.75v, at positive cycle of AC zero cross will occur at 0.75v earlier and negative cycle will zero cross 0.75v later.
The time can be calculated as (0.75/((230x√2x2x3.14x50)=7.34 micro second
Since it is about zero crossing, so it does not work. And it's devastating for a novice.