Raw code for the gravity emulator.