Update main.cpp

implemented physics part
Merge pull request #1 from kangtianyu/patch-1

Update main.cpp