Reference from CGWELL:
The reference is much better than my work, but I have not finished yet. My work: