Day 81: User Interface Design

Vpythoncontrols

Midterms are looming and I’m at the awkward state of “I really shouldn’t start anything new right now because they won’t remember it after exam week.” So now what?

In AP, we are taking our VPython simulation of Rutherford scattering to the next level. Some students are adding additional alpha particles and/or gold nuclei to their simulations. “Are energy and momentum still conserved? What cool trajectories are produced?”

Other students are creating user inputs, so you don’t have to modify the code to change variables like impact parameter, charge, mass, initial speed, etc. This has generated a lot of rich discussion that can’t be assessed on a multiple choice test.

The easiest input option is to have the program prompt the user for values first. “Set impact parameter: ” “Set initial velocity: ” etc.

But how would a user know what values are appropriate? What if the impact paramenter is too large or the velocity too small? Sure, the program will run, but the user won’t see any meaningful interactions.

Solution 1: Change the prompts to say “Set impact parameter (choose a value between 0 and 20e-15):

Solution 2: Have sliders, switches, and buttons that the user could manipulate.

Of course, Solution 2 is much cooler. So students are researching how to make these things from an example program included in the VPython package (see picture).

Are they learning physics by adding buttons? No. But the problem solving and user interface design elements here are also worth exploring.

Advertisements

About Frank Noschese

HS Physics Teacher constantly questioning my teaching.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: