graph

Yes, I love python. However, I am no expert. Most of the stuff I write in python is dirty and ugly code. Sometimes I figure out new things (things that programmers already know) and sometimes I forget these things. So, here are a few tips and tricks that I use from time to time. Really, I am writing this for future Rhett when he does a google search for "how do you save data to a file in python". Saving data to a file Suppose I am modeling a basketball falling through the air. I want to plot this data, so I save position and time data in lists. For example: Here is the info from scipy…
There is something I am working on that will need some type of angle sensor. I am going to use a potentiometer. First, who came up with that name? Isn't this name the same as a voltmeter? Something is wrong with that name. How about we just call it a variable resistor or something like that? These things are pretty easy to find if you have some old electronic stuff. Here is one I found in our "junk room". This one was used in a lab as a variable resistor with plugs built in. The normal potentiometer has three connections; one for each end and one for the variable position in the…
(alternate title: how to make pretty graphs in vpython) I am happy. Finally, I can use the visual module in python (vPython.org) and plotting with Matplotlib. Maybe this isn't such a big deal for many of you, but for me, it never worked until now. In the past, I blogged about plotting in vpython vs. matplotlib. My conclusion was that it was easier in vpython, but prettier in matplotlib. So, why not just use matplotlib? There are a couple of things that make vypthon very attractive. Vectors. Vpython has a built in vector class (or function - I don't know what I am talking about). There…
Sue from Math Mama Writes... sent me an email about wrapping a rope around a pole. In that post, Sue thinks about rope looped around a post. When you wrap a rope around a post, the friction between the rope and the post can help you hold something (like a horse) that is much stronger than you. The first case she thinks about is using several posts. What if you wrap a rope around one post and pull? What if you use 2, or three posts? The idea is that if one posts 'multiplies' the force by 10, two posts would have an effect of multiplying by 100 and so forth. That seems reasonable. The…
I happened to catch two parts of two different episodes of Meteorite Men - a show about two guys that look for meteorites. In both of the snippets I saw, they were talking about a debris field for a meteor that breaks up. In these fields, the larger chunks of the meteorite are further down in the field. Why is this? Let me approach this first from a terminal velocity view. This requires a model for air resistance. I will use the following: Where: rho is the density of air A is the cross sectional area of the object C is a drag coefficient that depends on the shape of the object v is…
Researchers at the University of Illinois, Urbana-Champaign have developed a way to compare aromas visually using specially developed inks. Kenneth Suslick and his colleagues used tiny squares of polymer film that hold 36 drops of carefully designed dyes. These pigments change colour when exposed to various chemicals. The result is a cheap system for detecting very low concentrations of gaseous compounds. The cards can be used like a physicist's radiation dose badge to alert lab workers when they have been exposed to toxic gases. As shown above, the cards can be used to give each…
After judging the science fair last week, I would like to revisit my tips for you the science fair participant. Warning number 1 Some of the things I say here might go against what your teacher has told you. I am not sure what you should do in this case. Your teacher gives you a grade and I am just some dude on the internet. Proceed at your own risk. Oh, and maybe you are a teacher. I think that is great that you are seeking more tips for your students. However, note that I have not read any science fair rules. I am merely thinking about science fair projects from a science viewpoint.…
If you know me, you know I love Tracker Video Analysis. Basically, it is a free-java program that allows you to get position-time data of a moving object from a video. In Tracker version 3.10, there is now the autotracker feature. This will automagically mark the location of an object moving in a video. How do you use it? First, the video. This is a video I made of a plane landing at an airport. Not much exciting going on, but that never stopped me before. I put this video on vimeo instead of youtube because vimeo allows you to download the original video. Landing Airliner from Rhett…
Wow. In xkcd 681 comic, there is an impressive illustration of the common term "gravity well". Here is a small part of that large image: I can't resist. I must talk about this awesome illustration. My goal for this post is to help someone understand that comic (although the comic itself does a pretty good job). Energy Energy is the key here. Here, I will talk about two types of energy - kinetic energy and field energy. In this case, kinetic energy is basically just the energy associated with something moving. Field energy is the energy stored in the gravitational field. You could…
This idea comes from my friend Thomas. His son is like mine in that they both think LEGO are awesome, and they are correct. For some reason, Thomas decided to calculate the price per piece of LEGO in each set. To promote repeatability, I decided to do this also. Looking at the catalog at LEGO.com, I can get both the price of each set and how many pieces it has. Just a note, I looked at almost all of the Star Wars LEGO series and some other select themes. I didn't include any sets that had been marked down in price. I will put the first plot on down below, maybe this would be a good…
What happens when your kids won't give you a turn on the Wii? Simple. You take their LEGO bricks and their slinky and do some physics. I will keep this simple. Basically, I created a slinky holder out of LEGO pieces and added LEGO bricks to the end to stretch it. Here is the video. Lego + Slinky = Physics from Rhett Allain on Vimeo. Maybe in an un-Dot Physics fashion, I am not going to analyze this data. I am not going to even describe the physics. Instead, I will leave this as a What Can You Do With This in the style of Dan Meyer. I will give a couple of hints. First, I put this on…
I don't really know what that title actually means. So, I have been having problems with my PASCO projectile launcher devices. I will just call them launchers (they are really cannons). In my previous post, I looked at the launch speed from a launcher shot horizontally and vertically. The problem was that I was getting different launch speeds for the vertical and horizontal shot. So, here is my plan: shoot the ball and a variety of angles from 0 to 90 degrees and see how the launch speed changes. I will only use the data from video analysis (of course using Tracker Video Analysis)…
If you didn't catch the latest MythBusters (yeah! new episodes), they did something straight from the physics textbooks. Just about every text has this example of shooting a bullet horizontally and dropping a bullet from the same height. The idea is that they should hit the ground at the same time. No one but the MythBusters could actually show this demo with a real gun. The Physics I am going to do some calculations, but I want to first write about the physics that accompanies this idea (and you can actually do it your self without the gun). What physics principle does this demo show?…
I think we are entering a new era. An era where it is quite simple to find and get great videos. Oh, just saw a great tackle on the TV? In the old days, you would have to get that video off the TV yourself. Not anymore. Welcome to the interwebs. Also, the quality is awesome compared to 10 years ago. Here is the video. Yes, I know this is from several weeks ago - I am slow. Also, thanks to the person that put this on youtube - I edited your clip to remove the music and just look at the one collision. You did a good job though. In terms of video analysis, this isn't too bad of a video…
I am not a programmer. Just to be clear. I use python to get things done, but I am sure it could be done in more efficient ways. Anyway, I sure you know how much I like vpython - especially for teaching physics. However, sometimes I use it for blogging stuff also. The problem is that vpython doesn't make pretty graphs. Oh, they are quick and simple - but sometimes you want pretty also. Well, what if you just don't use vpython? Of course then I could use some other plotting package like pylab (which actually uses something else like matplotlib or something - I get confused). Or, I…
Sciencegeekgirl is blogging from the AAPT. She talks about showing something interesting to get students thinking, and here is her example: This reminds me of Dan Meyer's What Can You Do With This stuff. Anyway, I can't help it. I must analyze this video. Plus, Fran essentially threw down the gauntlet and called me out on this move. Another reason to analyze this movie is that it is obviously fake. Elephants are one of the few animals that can't jump. Not even a little bit. They don't like to have more than 1 foot off the ground. Ok, on to the analysis. As usual, I downloaded the…
I made this screen cast for my algebra-based lab. Maybe you will find it useful also. This is a tutorial using Tracker Video Analysis (an awesome free program as I have said many times). In this tutorial I analyze a moving cart that shoots a ball up and lands back in the moving cart (called a Howitzer cart). The video is available at the LivePhoto Physics site. Screencasts and videos online
Here is another one from a great podcast - Buzz Out Loud. I totally can't remember which episode it was, I listened to a several in a row mowing the lawn and doing outside type work. Anyway, the discuss was along the lines of: Could an iphone tell if your parachute didn't open with its accelerometer? The first and simplest answer would be "no". When you are skydiving, you quickly reach terminal velocity such that you are no longer accelerating. Maybe the built in GPS could use elevation data, but it seems like that is rarely used (and not very accurate). There is perhaps a way that work…
This chart shows where your federal tax dollars go, based on Feb 2008 budget numbers (note: this shows discretionary budget, or appropriations, only - go here for more details, or look at the inset in the lower right corner to see where the other two-thirds of the budget are). Visit wallstats.com for a giant version.
Dan Meyer made this awesome photo. He posted it so that others could look at it and come up with lesson ideas to use with this. There are some very good suggestions in his comments. I wasn't going to analyze this because I didn't want to rob some students of the opportunity, but I can't resist. Also, I doubt the first step a student would use would be to google for the answer. HA! I just caught you, you googling student. Ok - I will try not to post any data. However, I will post some info on how I analyzed this. The photo is a composite image from a video clip of a person throwing a…