A physics Engine built from scratch