Programming Labs for Physics

These labs were designed by Prof. Chris Orban for Physics 1250 at OSU Marion and they should be generally useful at the high school and college level. No calculus knowledge or prior programming experience is required.

The nice part about these programming labs is that there is no software to install. The compiling and executing and visualization is all done within your web browser! This is accomplished using a programming framework called which is very similar to C/C++.

Prof. Orban is eager to collaborate with high school physics teachers! If you are a high school physics teacher please send an e-mail to if you are interested in trying this out or getting some training on how to use these exercises in your classroom.

Teacher Guide/Solutions:

Click here to go to the teacher guide/solutions (password protected but e-mail for the password)


Before doing anything please answer these survey questions!

Fun Video on the Physics of Video Games and the motivation of the STEMcoding project!!

Introduction to the Programming Framework (Tutorial Video)

Classical mechanics exercises:

Intro Lab 1. Move-the-blob exercise (Tutorial Video)

Pre-quiz for Accelerate-the-blob

Intro Lab 2. Accelerate-the-blob (Tutorial Video)

Post-quiz for Accelerate-the-blob

Just for fun: Force the Blob (Tutorial Video)

1. Planetoids game!

Introduction to Planetoids (Coordinate System)

Introduction to Planetoids (Angle System)

Pre-quiz for Planetoids

Lab 1. Planetoids game (Tutorial Video)

Post-quiz for Planetoids

2. Lunar descent game!

Pre-quiz for Lunar Descent

Lab 2. Lunar Descent game (Tutorial Video)

Post-quiz for Lunar Descent

3. Bellicose birds game!

Pre-quiz for Bellicose birds

Lab 3. Bellicose Birds game (Tutorial Video)

Post-quiz for Bellicose birds

4. Planetoids with momentum!

Pre-quiz for Planetoids with momentum

Lab 4. Planetoids with momentum! (Tutorial Video)

Post-quiz for Planetoids with momentum

5. Planetoids with torque!

Pre-quiz for planetoids with torque

Lab 5. Planetoids with torque! (Video Tutorial)

Post-quiz for planetoids with torque

6. Planetoids with a spring!

Pre-quiz for planetoids with a spring

Lab 6. Planetoids with a spring!

Post-quiz for planetoids with a spring

(Extra credit) 7. Bellicose birds with energy!

Lab 7. Bellicose birds with energy!

8. Pong!

Lab 8. The Pong game! (Video Tutorial)

9. clone

Lab 9. clone! (Video Tutorial)


Slingshot with gravity

Electromagnetism Exercises

Discussion of the unit system (protons have q = +1, m = 1)

1. Particle Accelerator

Pre-quiz for particle accelerator

Lab 1. Particle Accelerator! (Video Tutorial for Part 1, Part 2 still in progress)

Post-quiz for particle accelerator

2. Particle Accelerator with potential

Lab 2. Particle Accelerator (with potential!)

3. Point charge repulsion

Pre-quiz for point charge repulsion

Lab 3. Repulsion between two point charges

Post-quiz for point charge repulsion

4. RC circuit

Lab 4. RC circuits

5. Magnetic forces

Pre-quiz for magnetic forces

Lab 5. Magnetic force (a.k.a. Mass Spectrometer)

Post-quiz for magnetic forces

6. Wave interference (Tutorial Video)

Lab 6. Wave Interference!

Just for fun: thin film interference

Thin film visualization (Here is the code)