top of page

Verlet Collision Simulator

Project Status: In Progress

Project Type: Independent Project (Team)

Project Timeframe: 6/15/2022 - Present

Categories: Coding, Physics Simulation

Skills/Software used: Swift, Xcode

This project is a collaboration between me and my friends Shawn Duan (WashU '25) and Victor Kao (UIUC '24), and it integrates software development and physics integration. 

​

The app is developed in Xcode, Apple's development environment. Even though apple has a physics package within its developer API, we decided not to use it as it does not model the physics we need adequately sometimes. We coded the physics and from scratch using the Verlet Integration method. 

​

Put simply, Verlet Integration is an implementation of Newton's equations of motion, especially ones relating position, velocity, and acceleration (1). By using a Taylor expansion for an incremental step in time forward and backward, we obtain 2 expanded equations that we can add together to cancel out velocity (2,3). The final form of the motion equation only has position and acceleration terms (4). This is only a brief explanation; to see a fuller explanation please click here

​

Techniques like this can be seen frequently and clearly in functions like Simulate(), AdjustCollisions(), and ApplyConstraint() in Rope.swift. 

​

The collision between the ball and the rope is further developed by our own techniques, with tunable parameters that model the stiffness and elasticity of the string.

Screen Shot 2022-08-16 at 2.55.37 PM.png
Screen Shot 2022-08-16 at 2.55.29 PM.png
Screen Shot 2022-08-16 at 2.55.44 PM.png
Screen Shot 2022-08-16 at 2.55.53 PM.png

​

(1)

​

​

(2)

​

(3)

​

(4)

Please feel free to check out the GitHub page and download the source code to run! Unfortunately, due to a cost barrier in the app store, we are not planning to release the app to the public. 

bottom of page