Wednesday, May 6, 2015

Video Analysis Software

Video analysis is the single best tool that a teacher can add to her or his physics course, from a middle school science class to a college junior/senior level advanced physics course.

Direct Measurement Videos (DVM)


If you teach middle school science or a student's first high school physics course, I recommend Direct Measurement Videos. These videos, created by Peter Bohocek, include a frame counter, the frame rate, and a distance scale embedded into the video; thus no software is required for analyzing the video. Peter is the best videographer for video analysis. The library of videos includes:

Hockey slapshot






In my junior/senior level Classical Mechanics course, I have used:
  1. Disk Accelerated by a Model Rocket Engine as a lab where students model the wobbling disk to determine the percentage mass loss by the rocket engine.
  2. Dry Ice Puck Sliding on a Circular Hoop as a problem where students write a numerical model to calculate the angle where the normal force on the puck becomes zero.

Tracker

For students who may take additional physics courses or who may become professional scientists in any scientific or engineering field, I recommend the software Tracker. Here are some resources for learning about Tracker.
  1. A one-page Tracker "cheat sheet" to remind the reader of the most commonly used tasks to analyze a video. (Download: pdf, LaTeX)
  2. A PowerPoint presentation about Tracker. The zip file includes the presentation, videos, and Tracker files. (Download: ppt, zip).

Here are some sample experiments for introductory high school or college physics.







Friday, May 1, 2015

Near Space Balloon Launch NSC01 by Team Near Space Circus

My High Point University physics colleague, Martin DeWitt, and two first year students in DeWitt's PHY 2020 course, Graham Rich and Max Maurer, developed code to collect pressure and temperature data on a high-altitude balloon launched by a community of Python programmers in the Triad area.



The near-space balloon was a project organized by members of the Python Piedmont Triad Users Group (PYPTUG). The group of contributors, affectionally called "Team Near Space Circus," was led by Francois Dion with support from Inmar, Dion Research, and High Point University Department of Physics. A presentation by Franciois Dion is available. The people at the launch site in the photo below are: C. Shepard, J. Clouse, F. Dion, B. Wright, A. Titus, M. DeWitt, and G. Rich.




The approximately 7-ft diameter balloon was launched April 21st 2015 at 7:55am from RayLen Vineyards in Mocksville, NC. The balloon burst at an altitude of approximately 80,000 ft at 9:06 AM with a diameter of approximately 26 ft. The balloon landed in Hurdle Mills, NC -- about an hour drive from High Point University -- at 9:39 am for a total flight time of one and a half hours.



 



The payload included 7 Raspberry Pi computers running as a cluster, 7 CSI cameras, 1 USB camera, 2 GPS systems, sensors, 1 APRS transmitter doing 10W bursts every 2 minutes. At peak altitude, sensors measured a pressure of approximately 2800 Pa and a temperature of approximately -47.5 C.






Part 1 of the payload description written by Francois Dion gives information about the cluster of Pis and cameras. Part 2 describes the network, the master/slave component, and the deadman's switch (actually more like a life-giving switch because it powered on the system at launch). When it is posted, part 3 will talk describe the sensors and data collection.

Before launching, DeWitt used a Vernier LabQuest Mini and Force Sensor to measure the buoyant force on the balloon. The buoyant force was more than 40 N.


Presumably due to interference, our on-board GPS systems did not measure and transmit until after the primary set of batteries failed. After that, the GPS SPOT transmitted the location of the balloon.

Altitude was calculated from the pressure data. Here is a graph of altitude vs. time.


Pressure vs. time.


Rate of ascent and descent vs. altitude.


Rate of ascent and descent vs. time.


The peak altitude was approximately 80,000 ft. The payload landed at about 25 ft/s. The temperature at peak was approximately -47.5 C.

And of course, some photos from near space. 



Barrel distortion is quite small in these photos. See the technical descriptions of the cameras in Part 1 of Francois' blog post.

Thursday, April 23, 2015

VPython, Anaconda, and iVisual

Since 2003, we have taught physics students in our introductory, calculus-based physics course to use VPython to model physical phenomena and to solve problems numerically (that cannot be solved analytically at the introductory level). It is the single best change that we made to our introductory physics course to make it creative, relevant, interesting, and contemporary. Besides teaching students the utility of numerical modeling, one of our goals is to teach them to solve problems by applying fundamental principles, such as the Momentum Principle (Newton's second law). Applying the Momentum Principle in small, successive time intervals with VPython is both illustrative and productive.

VPython is ideal for teaching numerical modeling in introductory physics because its language (such as adding and subtracting vector objects) maps wonderfully onto the mathematical and verbal description we use in physics. VPython in general refers to two necessary parts:  (1) the Python language with (2) the Visual package.  VPython has evolved since we first began using it in 2003. In 2003, you had to install Python and Visual. The Visual package did not work well with other python packages so we rarely installed additional packages. An expert could get Visual and other packages like Matplotlib to work together, but it was not easy.

There are now at least five methods you can use to install and run VPython or code similar to VPython code. Because we can now run VPython code (or code similar to it) in an iPython Notebook or in JavaScript, we sometimes refer to "VPython" as the set of commands used to create 3D objects, refer to the properties of those objects, and add and subtract vectors.

Here are the five methods to install VPython or something similar to VPython.

  1. Install Python and Visual using the installers and instructions at www.vpython.org.
  2. Write programs at www.glowscript.org. GlowScript is a JavaScript library that has a similar syntax as Visual and allows you to write code similar to VPython.
  3. Install Anaconda and Visual.
  4. Install Anaconda, iPython Notebook, and iVisual and run VPython code within a notebook in a browser.
  5. Write GlowScript code in a trinket.



My Recommendation

If you are teaching VPython to students in introductory physics, whether in high school or in college, I recommend Method 1 (vpython.org) or Method 2 (GlowScript). The installation is simple, and introductory physics students can pick up the process of: (1) write, (2) run, (3) edit, and (4) re-run with very little effort. Students with zero background in programming can learn how to do this very quickly.

But if your students are advanced or if they have experience with VPython and wish to combine Python with other packages such as Matplotlib or Sympy, I recommend Method 3 (Anaconda and Visual) and Method 4 (iPython Notebook and iVisual). Anaconda and iPython Notebook are frequently used by professional scientists. Experience with Anaconda, iPython Notebook, and other Python packages will help prepare students for future jobs in industry or research, for example.

If you plan to embed VPython code into a blog or other web site, I recommend using Trinket.


VPython


This installation procedure given at www.vpython.org is very simple and has not changed since before 2003, although Python and Visual have been upgraded. You can choose to install the version of Visual for Python 2.7 or the version for Python 3. We prefer Python 2.7 because other packages like Serial that you might use with Visual have not been upgraded to Python 3. Many professionals in the Python world still use version 2.7. It is still widely supported with many packages.

This is EASY. There are two installers. First, install Python. Second, install Visual. It's that simple. Thousands of students have installed VPython with no trouble. It is simple, and it works reliably.

Download sample programs from Matter and Interactions.


GlowScript

Go to the GlowScript site, view sample programs, and create an account.

Original VPython programs written for the Matter and Interactions textbook can be run in a browser using GlowScript.

There are some introductory GlowScript tutorials by Rhett Allain. Tutorials 1-7 will get you started.


Installing Anaconda, Visual, and iPython Notebook with iVisual


I. Anaconda and Visual

You can install the Visual package with Anaconda and run VPython programs from the command line.  The Anaconda recipe to install visual was created by Matt Craig. Here are the steps to install and run a VPython program using anaconda.

  1. Install Anaconda. (http://continuum.io/downloads)
  2. From a command line, type:        conda install -c mwcraig vpython
  3. To run a program called "filename.py", from a command line type:   pythonw filename.py
Anaconda has many other scientific useful packages pre-installed, such as Matplotlib for graphing data. THIS is the number one advantage of using Anaconda to install Visual.


II. Anaconda, iPython Notebook, and iVisual

If you installed Anaconda, then it already has iPython and Notebook pre-installed. The only additional package you need for running VPython programs in a notebook is iVisual. Here are the steps to install iVisual (more detailed instructions with screen captures are available):
  1. From a command line, type:  pip install ivisual  
  2. From a command line, type: ipython notebook
  3. The notebook home screen will open in your browser. Create a new notebook. 
  4. Type the following program into a cell.

from __future__ import division, print_function
from ivisual import *
#create scene
scene = canvas(title='3D scene')

sphere()
My Classical Mechanics class used iPython Notebook and iVisual for an entire semester, and it worked wonderfully. Here's a presentation I gave to Guilford College with a notebook.

III. Using Anaconda's Virtual Environments

As you install more and more packages in Python, there is the chance that an installation fails and wrecks your Anaconda library, requiring you to install Anaconda and all of your favorite packages all over again. Therefore, if you use Python for different projects that use different packages, I highly recommend creating virtual environments for each project. A virtual environment is a sandbox where you only have the toys that you want to play with in that particular sandbox.

For example, I starting playing with VPython and Arduinos to create 3D games that can be controlled with sensors and an Arduino. In case I messed something up, I created a virtual environment called pyarduino.  So when I'm working on a project with VPython and an Arduino, I go into that environment and install just the packages that I need.

Here are most of the commands that I use to create and use virtual environments:

1. To create a new environment named myenv for example (with a barebones python installation with few packages) , type: 
conda create -n myenv python

2. To activate the environment myenv so that installing new packages or running a python program only occurs within myenv, type:  
 source activate myenv

3. To get out of the environment myenv type:   
source deactivate.

4. Occasionally I forget what environments I created. To list the environments, use:
conda info -e

Using Trinket to Write and Run GlowScript

Trinket is a web-based programming environment designed for teaching and learning. A "trinket" is program that can be viewed, edited, and run within the browser. You can use Trinket to give example code to students. Then they can modify the code, run it, and view the result of their changes.

You can also embed a trinket in a blog or other web site. For example, here is the familiar bouncing ball from the glowscript.org site embedded as a trinket.



As an aside, you can also use Trinket to create entire course web sites. For more information about Trinket, see my blog post or my sample PHY 3110 Classical Mechanics course.


Summary

To summarize, use vpython.org or GlowScript with introductory physics students and/or new programmers. For advanced students doing research or gaining experience toward a career in science, use Anaconda with Visual or use Anaconda with iVisual and iPython Notebook. If you wish to develop instructional resources or teach programming, then use Trinket.

Saturday, January 17, 2015

Physics of Tennis

One of the most essential aspects of playing tennis is the spin of the ball. The ball's spin affects its flight in the air and the direction it bounces. To hit the ball hard, yet keep it within the boundary of the court, it's important to give the ball topspin. The topspin causes the ball to arc downward and land in bounds. If hitting a drop shot, you want to give the ball backspin so it has almost no horizontal velocity after it bounces, making it harder for the opponent to reach the ball before the second bounce. And when serving, players give the ball topspin (to land in bounds and avoid a service fault) or sidespin to cause the ball to bounce away from the opponent or into the opponent's body, (making it hard for them to return the ball). As a result, one of the most essential skills players learn is the ability to hit the ball with the desired spin.

When a ball collides with a surface such as the court or the strings of the racquet, the force by that surface on the ball can be separated into two parts, called components. In this analysis, let's consider the ball colliding with the racquet. The perpendicular component of the force on the ball (by the racquet) is the component of the force perpendicular to the surface of the racquet. The parallel component is the component of the force parallel to the racquet. This parallel component is what we call friction, and it is the frictional component that is solely responsible for giving the ball spin.

I will apply this general idea to the specific case of a serve. Let's assume that the player tosses the ball vertically and strikes the ball when the ball is at its peak and has zero velocity. Suppose that after the ball leaves the racquet, it has a velocity vf that is horizontal. On a serve like this, the racquet is generally angled downward when it strikes the ball as shown in Fig 1.

Figure 1: A racquet striking a ball during a serve.

Because the velocity of the ball before hitting the racquet, was zero, then the force on the ball by the racquet in this case is in the same direction of the velocity of the ball when leaving the racquet. I can now draw each of the components mentioned earlier, the force perpendicular to the racquet and the force parallel to the racquet which is friction. The force by the racquet and its components are shown in Fig. 2. It is the frictional force by the racquet on the ball that gives the tennis ball its spin.

Figure 2: A force on a ball during a serve.

So the frictional force gives the tennis ball spin. But will it be topspin, backspin, sidespin, or some combination? It depends on the line of action of the force. In Fig 3, I show just the force by the racquet and the frictional component with the picture zoomed in for clarity. The dot is the center of the ball. The line through the force vector is called the line of action. If this line of action passes above the center of the ball, then the frictional force causes topspin (which is counterclockwise in Fig. 3). As an aside, note that if the line of action goes through the center of the ball, then the ball will not spin at all.


Figure 3: The line of action and moment arm causing topspin.

An inexperienced player sometimes hits a serve as shown in Fig. 4 where the racquet is tilted upward.

Figure 4: An inexperienced serve. If hit hard, it'll be a service fault.

Again, suppose that the ball was struck when it was momentarily at rest and leaves the racquet horizontally. In this case, the line of action passes below the center of the ball as shown in Fig. 5, so the frictional force causes backspin (which is clockwise in this view).

Figure 5: The line of action and moment arm causing backspin.

Professional players want topspin on their serves so that while in flight, the air pushes downward on the ball causing it to land within the service box. However they also want sidespin on the ball so that when the ball bounces, friction by the court on the ball will cause it to bounce either away from the opponent or into the opponent's body, making it harder to hit in either case. As a result, they hit the ball above the center of the ball and to the side (left or right) of the center of the ball.

To illustrate this, first look at Fig 6. This is a side view of a 3-D image of the tennis ball, similar to Fig. 3, showing the force on the ball by the racquet.

Figure 6: A side view of the tennis ball showing it will have topspin.

Now I'm going to rotate the 3-D image so that you can see the ball from the perspective of the tennis player who is serving. Fig 7 shows the ball rotated so that the force vector is pointed away from the tennis player. In this view, you can see that the force by the racquet on the ball is to the left and above the center of mass. As a result, the ball has both topspin and sidespin, as it spins clockwise around the +y axis. When this ball passes over the net and bounces, it will spin to the right, as viewed by the server.


Figure 7: 3-D view from the server's perspective showing that the ball will have both topspin and sidespin. After hitting the court, it will bounce to the right, as seen by the server.

After this type of serve, the racquet's surface that struck the ball must face away from the server (and down). For a right-handed player, this serve is called a kicker because the ball "kicks" to the right when it bounces, as viewed by the server. In this picture of Roger Federer, you can tell that he served a kicker by the fact that his racquet faces away from him and his wrist and elbow are facing downward toward the court.


Figure 8: Roger Federer serving a kicker. (http://tennis.topbuzz.com/tennis-pics/d/925-3/roger+federer+serve+follow+through.jpg)

Suppose that a right-handed server wants to hit a slice so that the ball spins counterclockwise around the +y axis and bounces to the left as viewed by the server. In this case she should hit above and to the right of the center of the ball. Fig 8 shows the force on the ball in this case.


Figure 9: A 3-D view from the server's perspective showing a slice. After hitting the court, the ball will bounce to the left, as seen by the server.

So now that you know how the angle of the racquet affects the spin of the tennis ball. Here's a quiz for you. For each of these images, predict whether the ball will have mostly pure topspin, pure backspin, or a combination of topspin and sidespin. If it is a combination, predict whether it is a "slice" or a "kicker." The answers can be found at end.


Figure 10: Kei Nishikori (http://mediaassets.kitsapsun.com/photo/2014/09/03/2014_US_Open_Tennis__WABRE_webfeeds_9_1409780583595_7713166_ver1.0_640_480.jpg)



Figure 11: Sabine Lisicki who is the current world record holder for the fastest serve in women's tennis. (http://espn.go.com/photo/2014/0827/ten_g_lisicki11_800x450.jpg)



Figure 12: Venus Williams. (http://mediaassets.kitsapsun.com/photo/2014/08/29/2014_US_Open_Tennis__WABRE_webfeeds_31_1409348545760_7620937_ver1.0_640_480.jpg)

Now that you know the physics required to give a tennis ball spin, you are ready to compete...in the U.S. Physics Olympiad. To compete in tennis, you'll probably need about 10,000 hours of practice. Compared with playing professional tennis, physics probably looks easy.


Answers: Figure 10 is backspin. Figure 11 is a kicker. Figure 12 is topspin.

Presentation on Standards Based Grading to HPU Faculty

It was a pleasure to speak to friends and colleagues at High Point University (HPU) about Standards Based Grading (SBG) on Feb 15, 2015. It was the inaugural presentation for the newly established Center for Innovative Teaching and Learning at HPU.

My presentation was hugely influenced by Frank Noschese's 2014 AAPT presentation. I used some of his slides. Other influences are: Shawn Cornally, Josh Gates, and ActiveGrade.





Statement on Syllabi

Here is the statement that I include on my syllabi regarding SBG in general.

In this course, I want to encourage you to be a life-long learner. This requires that you develop a growth mindset. In other words, I want you to be driven by answering interesting questions, making reasoned arguments, and developing new skills and knowledge independent of grades and test scores. As a result, I will use a grading system called Standards-Based Grading (SBG) which determines grades based on your demonstration of skills and knowledge at the end of the semester and does not penalize you for not having those skills and knowledge at the beginning of the semester. In my opinion, SBG incentivizes growth instead of performance. 
Instead of getting numbers, or letters, on assignments and exams that average into a final grade for the course, there are a set of standards on which you are expected to show improvement throughout the semester. Each assignment assesses some subset of these standards, and on each standard, you will receive a number from zero (“does not demonstrate the standard”) to 4 (“demonstrates sufficient mastery of the standard”). Each standard will be assessed multiple times in multiple assignments. The most recent assessment will replace scores on previous assessments. In this way, as you improve, early poor scores will not significantly impact your grade.
Table 1 lists the standards that will be assessed in this course. Each of these standards is tied directly to the learning outcomes. Every assignment (and many course activities) will provide an opportunity to demonstrate certain skills and thereby fulfill certain standards. 

Each syllabus lists standards and the grading algorithm. The standards and the grading algorithm depend on the course.

First Year Seminar (Fall 2014) on SETI

Standards

Grade Computation

(Advanced) Classical Mechanics (Fall 2014)

Standards


Grade Computation

Tuesday, August 13, 2013

Launching the Department of Physics at High Point University

Fall 2013 marks the birth of the Department of Physics at High Point University. We fissioned from the Department of Chemistry. Here's a brief history.


  • Fall, 2002:  I was hired as the first tenure-track physics professor at HPU.
  • Fall, 2008:  Martin DeWitt was hired.
  • Fall, 2010:  BS and BA programs in physics were created.
  • Fall, 2011:  Briana Fiser was hired.
  • Spring, 2012:  Our first graduating class of physics majors.
  • Fall, 2013:  Brad Barlow was hired.
  • Fall, 2013:  The Department of Physics is launched.


I am overwhelmed with gratitude when I think of how far we've come. Our success is due to the support of President Qubein, Provost Dennis Carroll, Dean Carole Stoneking, and colleagues Gray Bowman and Rob Harger. Our success is also due to the awesome students who believed in us. They are academic entrepreneurs.

Together, as a team with my colleagues, we are building a student-centered program that is founded on:

Physics faculty 

This is our core strength. We share the passion, enthusiasm, dedication, and talent to grow a strong program.

Undergraduate research

This is our core message. This impacts recruiting of freshmen, success of students' applications for summer research programs and internships, and success of students' applications to graduate school and industry.

A creative approach

This is our core vision. We are not held back by the way things have always been done. As a result, we are creative in the classroom and creative in our curriculum.

Students' success

This is our core evidence. We brag on our students, their work at HPU, their work in summer internships, and their work after graduation. Student success is our success.


Reflections on Teaching Naked workshops with Jose Bowen

Day 1

Yesterday was Day 1 of Teaching Naked by Jose Bowen for the 2013 High Point University Faculty Orientation. Here are some approximate quotes from the session.

Everything (from academics to student life) must have faculty interaction -- that's the value of a residential education. [Titus note:  interaction is two-way communication, not one-way communication.]
Learning is about change, not content, not indoctrination. College is about learning the power of slow thinking and learning the power of changing a person's mind and changing your own mind.
Don't assign papers using "page" limits. The unit of "page" was used when papers were written on typewriters. Assign papers using units of "words," like 2000 words or 4000 words, etc. After all, what is a "page" in a mostly digital world.
Don't pick learning outcomes just because they can be assessed. It's better to fail at assessing than to fail at creating significant learning outcomes.
You beat MOOCs with MBCs (Massively Better Classrooms).
What is your unique value proposition to students?
We graduate students who all have the same amount of time in class (128 hours or whatever) but varying levels of learning (i.e. knowledge, skills, etc.).  We should graduate students based on what they learn rather than seat time.
More knowledge does not create a more enlightened society. My job as a teacher is not to fill heads with content but to change their minds.
In speaking to Dept. Chairs...
Course evaluations should be tied to learning outcomes.
Encourage risk and failure. When someone is creating a new course or reforming a course, don't use course evaluations for two years.
How do you overcome the barriers to change? Tackle reformation as a team. Take the hit together.
 The Teaching Naked Cycle
  1. Email to prepare for first exposure
  2. Content for first exposure (reading/video/assignment)
  3. Exam to focus
  4. Writing to reflect
  5. Class to challenge: http://reacting.barnard.edu/
  6. eCommunication to reinforce
Note that 1-4 happen before class. 5 happens in class. 6 happens after class.

Day 2

There were lots of "nuts and bolts" for writing learning outcomes, writing questions that require higher order thinking skills, etc. Here are a few quotes that stuck with me.

Finding assumptions is what critical thinkers do.
The #1 way to succeed in upcoming years, amidst a highly competitive and changing climate in higher education, is to improve student learning in the classroom.
After these workshops, I'm even more convinced that SCALE-UP classrooms are the way to go for the Department of Physics at High Point University.