Using GlowScript in AP Physics C

Rather than work on THIS week, I spent some time today trying to put together something for the Hour Of Code for my AP Physics C class. I am a fan of Rhett Allain at Wired’s Dot Physics. He teaches using a version of Python (really VPython) called GlowScript and I have been working up some code using some of the video analysis labs we’ve done in AP Physics. First, here is the video upon which this code is based. Check that out first. This is one of the fantastic direct measurement video labs from Peter Bohacek and has built-in controls and measurement tools. Those by themselves are fantastic for teaching and learning physics.

Here is my code written and edited at GlowScript.org. Give it a try and compare the result to the video. Not too bad. Now I think the cool bit will having the students do similar things. This is a PERFECT activity for Hour of Code coming up in December.
Here is the code, but although the link above is working, the code below may not.

For astro, I’m going to modify an activity from HOC 2014 from AAS, PencilCode, Google CS First, and Code.org.

Whiteboards for Physics Class

Student whiteboards
1 of 9 student group whiteboards cut to 2′ x 2.67′

In the summer of 2015 I attended a Rice AP Summer Institute for AP physics C run by Jeff Funkhouser. We were in groups of 3 or 4 at tables and we worked on FRQs as well as other tasks. When each group was to present something, the members would put all the work on a 2’x3′ dry-erase board. Then we all face one another and analyze the work of the other groups. This was an interactive and efficient way to cover a lot of material in a short time.

Jeff mentioned where one can buy or make the boards. Well I finally made the boards. Any big-box hardware store will have the material. I went to Lowe’s but I also called Home Depot and I could’ve done the same thing at either place. I asked about the price of the glossy hardboard. It’s also called tile board sometimes. Both stores had 8’x4′ sheets for around $15 and both places would cut the boards into equal pieces for nothing or for $0.25/cut. Lowe’s hardboard I actually used. Seemingly equivalent board at Home Depot.

rough sketch to make the cuts clear to the sales associate helping me out

I also bought a $5 hand sander and some $5 work gloves. Now I will take the receipt to school and get reimbursed and I have 9 boards. Perhaps I’ll head back to the store sometime during school and get some more boards. This makes a classroom set for me. It might be better for each period to have a set but this is a start.

Thanks Jeff for the great idea!

Bellaire ExMASS Students Take ESF 2015 by Storm!

Steven Z.-W., Kevin N., Afton W., Sue Anne D., Jennifer W.

Bellaire participated in the SSERVI/LPI ExMASS project in 2014-2015. A group of 5 students did original research related to asteroids. You can read more about the group and their research here.

The Bellaire team was selected among the various schools to attend a planetary science conference related to lunar and asteroid science to present their poster during poster sessions. I got to tag along. The conference is the NASA Exploration and Science Forum and gathers lunar scientists and small body (asteroid mainly) scientists to share current research. The posters alone were worth the trip. The talks and the tours made the whole experience one-of-a-kind for us.

Bellaire Poster on display. Number 74.

We got to attend the sessions and ask lots of questions. And also visit with the other poster presenters. There was one other high school group. Mainly the attendees are current scientists but young planetary scientists are also a focus of the conference. Each poster presenter had 1.5 minutes to convince people to come find their poster.

In the Lightning Round, poster presenters convince people to come visit
Planetary scientist Andy Rivkin asks the team about their research
Opening talk by SSERVI director Yvonne Pendleton. Afton is actually paying attention…

We heard a lot of talks about cutting-edge planetary science.

Maurizio Pajola talks about grooves on Mars’ moon Phobos
Adrian Brown talks about spectral features on asteroids.
Benjamin Hockman shows off the “hedgehog” hopping rover design using an Arduino board.
UC Boulder engineers show up telerobotic testing platform using an Arduino a Raspberry Pi.
LMMP on a Microsoft Surface table by JPL and NASA Ames

We got to explore some very cool data visualization stuff from NASA Ames and the Jet Propulsion Laboratory. The Lunar Mapping and Modeling Portal looked especially awesome on a Microsoft Surface table. You could also explore Mars using an Oculus Rift VR headset. One could see asteroid, lunar, and Martian 3D prints from real data. And take the new VestaTrek web-interface for a test drive. The JPL team must have been tired of my constant questions about the comp sci and data vis stuff. This was my favorite spot at the conference. Thanks to George Chang, Emily Law, and Shan Malhotra for being patient and helpful!

3D Printed Surfaces of Mars, the Moon, and Vesta from actual datasets by NASA Ames and JPL.
Oculus Rift VR exploration of planetary science datasets from JPL and NASA Ames.

We also got a guided tour of NASA Ames (where the conference was hosted). The wind tunnels are the largest on Earth and very impressive. We also got to tour the Ames Vertical Gun Range (where impacts are simulated), the Vertical Motion Simulator (where flight systems are tested), and the NASA Ames visitor center with the requisite astronaut ice cream and t-shirts. I did get a shirt and coffee cup. We also got up close and personal with Hangar One and some former NASA test aircraft.

NASA Ames Giant Wind Tunnel (just one small part)

This wind tunnel system has played a part in everything from the Shuttle program to Mars Curiosity Rover not to mention almost every aircraft sold by U.S. manufacturers.

AVGR target zone. Note the plumb bob and sand crater.
Team next to target vacuum chamber for AVGR.
Some of the interchangeable ICAB units at the NASA Ames VMS.
Very cool spherical display at the NASA Ames Visitor Center. It had images on the entire surface.
Infamous Hangar One in partial state of deconstruction.

And we got a personalized guided tour of the SETI Institute by Seth Shostak. We got to meet some of the team and see some of work done at the SETI Institute. Including information about the Allen Telescope Array. We also got to tour the studio where Big Picture Science is created!

Seth Shostak from the SETI Institute gave us a personal tour.
Allen Telescope Array display at the SETI Institute. The Allen is Microsoft co-founder Paul Allen.
3rd Place Award for Posters

This trip was one of the coolest experiences I’ve had as a science teacher. At the end of the conference we got a huge surprise when the students were awarded 3rd place in the poster competition along side postdocs, grad students, and undergraduates. Congrats to the Bellaire ExMASS asteroid research team. Let’s see how the next team from Bellaire fares. Thanks very much to Andy Shaner of the Lunar and Planetary Institute for hosting us, ferrying us all over Mountain View, and coordinating everything! He’s also the coordinator for the ExMASS High School Research Project.

2015 AP Comp Sci Free-Response Solutions

2015 AP CS FRQ Solutions

Today the 2015 APCS FRQs were released. Here are my solutions. I did create all the extra code to test all these classes and interfaces out as well. But these are just the answers to the questions. If you want a BlueJ project with classes for testing the code, click here. If you just want to browse the classes, click here.

Question 1

//part A
 public static int arraySum(int[] arr)
 {
    int sum = 0;

    for(int n : arr)
      sum += n;

    return sum;
 }

//part B
 public static int[] rowSums(int[][] arr2D)
 {
    int[] sums = new int[arr2D.length];

    for(int i = 0; i < sums.length; i++)
    {
       sums[i] = arraySum(arr2D[i]);
    }

    return sums;
 }

//part C
 public static boolean isDiverse(int[][] arr2D)
 {
    int[] sums = rowSums(arr2D);

    for(int i = 0; i < sums.length; i++)
       for(int j = i+1; j < sums.length; j++)
          if(sums[i] == sums[j])
             return false;

    return true;
 }

Question 2

public class HiddenWord 
{
   private String hidden;

   public HiddenWord(String h) 
   {
     hidden = h;
   }

   public String getHint(String hint) 
   {
     String r = "";

     for(int i = 0; i < hint.length(); i++) 
     {
       if(hint.charAt(i) == hidden.charAt(i))
         r += ""+hint.charAt(i);
       else if(hidden.indexOf(hint.charAt(i)) > -1)
         r += "+";
       else
         r += "*";
     }

     return r;
   }
}

Question 3

// part A
 public int getValueAt(int row, int col)
 {
    for(SparseArrayEntry e : entries)
    {
       if(e.getRow() == row && e.getCol() == col)
         return e.getValue(); 
    }

    return 0;
 }

 // part B
 public void removeColumn(int col)
 {
    numCols--;

    for(int i = entries.size()-1; i >= 0; i--)
       if(entries.get(i).getCol() == col)
          entries.remove(i);

    for(int i = 0; i < entries.size(); i++)
       if(entries.get(i).getCol() >= col) 
       {
          SparseArrayEntry h = entries.get(i);
          SparseArrayEntry e = 
             new SparseArrayEntry(h.getRow(),(h.getCol()-1),h.getValue());
          entries.set(i, e);
       }
 }

Question 4

// part A
public interface NumberGroup 
{
     public boolean contains(int num);
}

// part B
public class Range implements NumberGroup 
{
   private int[] list;

   public Range(int min, int max) 
   {
      list = new int[Math.abs(max-min+1)];
      for(int i = 0; i < list.length; i++)
          list[i] = min + i;
   }

   public boolean contains(int num)
   {
      for(int n: list) 
         if(num == n)
            return true;
      return false;
   }
}

// part C
public boolean contains(int num)
{
   for(NumberGroup n : groupList)
      if(n.contains(num))
         return true;
   return false;
}

Jess Hester brings SpaceX to Bellaire

My first ever astronomy class at Bellaire was one period and very mixed group of students. Some were all AP/IB and some took no advanced classes at all. It was, essentially, an experiment. I had no idea what I was doing really, but it was a fun, fun class. Jess Hester heard during her junior year that I’d be teaching astronomy and was the first person to sign up. Even though the course wasn’t weighted like the AP and IB courses, she was my most enthusiastic supporter. We’ve stayed in touch. She went to Harvey Mudd College in California and majored in mathematics and computer science. She got a job at SpaceX, the Elon Musk owned commercial space company.

Today she came to my current astronomy classes which are now IB astronomy and represent the a more rigorous course. The students are still a mix. She brought some SpaceX giveaway stuff too. Patches, pens, lanyards, and stickers. Awesome stuff. The kids asked great questions and Jess was smart and informed and very impressive. We all had a great time and I’m glad she agreed to come talk.

Bellaire Students Find Possible Asteroid Family

BHS ExMASS Team (left to right) S.A. Davis, S. Nguyen, J. Wang, A Widdershins, S. Zhou-Wright

In the fall of 2014, I sought out some students to participate in a 6-month long research project related to asteroid science. The program is called Exploration of the Moon and Asteroids by Secondary Students (ExMASS) and is managed by the Center for Lunar Science and Exploration (CLSE) and administered at the Lunar and Planetary Institute in Houston.

The students were juniors and seniors. My experience has been that juniors have the desire and most of the needed knowledge, and seniors have the needed knowledge and most of the desire. So mixing juniors and seniors is often a winning combination when it comes to academic programs. After a bit of shifting around, we ended up with a final team of 3 seniors and 2 juniors. I have taught each of the students in the 5-member team in at least 2 courses: AP Physics C, AP Computer Science, and IB Astronomy. Some of them have had all three courses.

Asteroid 101 image 1
Asteroid 101 image 1

 

Asteroid 101 image 2
Asteroid 101 image 2

 

Asteroid 101 image 3
Asteroid 101 image 3

The initial objective is for the team to analyze some known data about asteroids and present their findings to one of the program administrators. This means a web-based presentation to a scientist about a topic the students only recently explored. This is called the asteroid 101 presentation. Once that’s done, a bit of a debrief is in order. How did the students answer the scientist’s questions? What was good and what was bad about the actual presentation? What science skills do the students still lack?

Next up the team gets to know their science advisor. The start and stop process of trying to choose a direction for actual research can be very frustrating. This is where I feel like the mentor’s role (that’s me) is critical. The students lose focus. They don’t really have enough experience. They need encouragement. They need face-to-face meetings to brainstorm. Eventually one of the team members dug a bit deeper and came up with some possible avenues of research. She presented her findings, and the team debated and discussed. Then they simply picked one of the ideas and ran with it.

This is when things got interesting. The positive feedback loop between the team and the science advisor seriously allowed the team to have ownership of their research. They needed to learn some science skills, some math skills, and some tech skills to put the question and the answer together. Eventually the team realized they had found the possible fingerprints of an ancient asteroid catastrophe. They tracked down data on a series of asteroids that could possibly have come from a disrupted parent body. Perhaps it was broken up by collisions or tidal forces.

Zhu Que tile rubbing courtesy Harvard

So did the team actually discover the remnants of an asteroid? Well, they named it just in case. They decided on Zhuque (sometimes also called the Vermillion Bird) since Bellaire’s mascot is a cardinal. The name also has mythological roots which is consistent with naming conventions from the IAU Minor Planet Center.

They sent their preliminary results to the advisor. She was very encouraging and also gave them plenty more to chew on to clarify their findings. Then all of a sudden it was time to put an actual poster together and write an abstract. This stage was surreal. The team was a cohesive science team. The advisor seemed to think they might have actually found something. What’s interesting about the discovery is how much of an afterthought it was. They were having a blast just digging around in this area.

Once the poster and abstract were done, it didn’t matter to me if they won because the project had been a success. This team had put a serious scientific effort into a question that interested them all and had a great piece of work to show for it. The full size poster is available, but it’s really big (~26mb).

Other schools also submitted posters and abstracts. They also had great products to show for the months of work. So when the Bellaire team learned that they and 3 other teams were going to present their work to the judges in a video conference format, we were all very pleased. There was a rush of work at the end to build a presentation out of the poster findings, but when the day came what the teams put together for the judges showed just how creative high schoolers can be when asked to do real science. None of these kids were even out of high school yet, but here they were showing off fantastic work. All 4 finalist teams will have their work displayed at a national conference on planetary science. One team would be asked to actually present in person at the National Exploration Science Forum.

The 30 minutes the judges spent in deliberation were very tough for some of the team members. That’s why when the judges decided the Bellaire team had earned the privilege to present their findings they couldn’t contain their glee. I’m so proud of the work the Bellaire team has done on this project. It’s been great for all involved. Each of us learned stuff and got an improved set of science skills from the experience. Even though all I did was essentially keep them on track, I still feel like I was a part of team, even if just as a minor player. I hope Bellaire gets a chance like this again. I look forward to other research project opportunities in the future!

Here are some photos of the presentation to the judges.

Meeting the judges
S.A. Davis presenting some results
Q and A
Q and A
Q and A
Q and A
Q and A