The Five Best Lightsaber Fights in Star Wars

The great thing about having a personal blog is that I can write about whatever makes me happy. Today, it’s Star Wars.

Actually, this was a question that my older son asked. What are the best lightsaber battles? I love these questions—they don’t really have just one answer so you can argue over who is right with no real winner.

Let’s get to it. If you don’t agree with this list—I’m ready for your complaints.

5: Darth Maul & Savage Opress vs Darth Sidious (The Clone Wars)

Just to be clear, this is from the Clone Wars animated series. This is my son’s favorite (he’s a huge Clone Wars fan). It’s pretty cool because it shows how powerful Sidious can be when he wants. Also, bonus points for the Dark Saber.

Double bonus, here is my son’s reenactment of this battle. Brace yourself.

4: Luke vs. Darth Vader (Episode V The Empire Strikes Back)

Yes, it’s true that this fight isn’t as dynamic as those in the prequels or the Clone Wars. I get that. Also, it’s possible that I just like this one because I’m older and this battle was so epic when it came out. But you have to admit that the cinematic quality here is awesome. Love it.

3: Qui Gon and Obi Wan vs. Darth Maul (Episode 1: The Phantom Menace)

This could be in the top five just because of the music. It’s also the first time we see how crazy a real lightsaber can get. I mean, before this all we saw was old men, half robot, and young mostly untrained warriors.

Also, it’s got a nice two vs. one AND a double light saber.

2: Obi Wan vs. Darth Vader (Episode IV A New Hope)

OK, this might not count. This is a fan-made redo of the battle between Darth Vader and Obi Wan on the Death Star. I guess it’s not canon in the Star Wars universe—but I can’t help myself. If this was how it originally happened, I would put this at number 1.

Oh, I was watching Episode IV the other day. When it came to the Vader vs. Obi Wan fight, I paused the movie and switched to youtube to watch this version.

1: Obi Wan vs. Darth Maul (Rebels)

You might not like Star Wars Rebels—I get that. It’s sort of like a combination of Aladdin and Star Wars. However, there are some really great parts in this show. When Darth Maul finds Obi Wan and tries to kill him—this is just the best. It’s not about the light saber action, but it’s still just the best.

Modeling a Spinning Sprinkler

Subtitle: “You don’t really understand something until you model it”

Here is the video. It’s great. Watch it.

The basic idea is to predict the path of water that is shot from a spinning sprinkler. In the first case, the water is shot straight out of the spinning pipe. The second case is a little bit trickier with the water shot towards the center of the sprinkler. OK, it’s not actually a sprinkler.

Of course, once a drop of water leaves the sprinkler, it will only have the gravitational force acting on it. So, if you view this from the top—a drop of water should travel in a straight line with a constant velocity. But there is a problem that makes this difficult to predict. It’s that we don’t see the path of one drop of water, we see the path of a water stream.

A water stream is a collection of water drops. Even though one drop might travel in a straight line, the next drop will be “launched” at a different location with a different velocity. This makes it look weird.

OK, so let’s get to a model. I’m going to go over the steps to build this model in VPython.

Build a bar

Don’t try to do everything at once. Let’s just make a spinning bar—I’ll add water balls later. Here is what that spinning bar looks like.

And here is the code (along with a link to the code – https://trinket.io/glowscript/d6545ddfca

Let me go over some of the important parts of this code.

  • The bar is an object of type “box”—this is a prebuilt object in VPython. It has two important attributes. The position (pos) is the location of the center of the box. The size is the vector with length, width, and height.
  • I added a ball so you can see the center (it’s not needed).
  • The variable “omega” is the angular velocity of the rotation. You can change this if you like.
  • The variable “theta” is the angular position of the bar—this is used for something later.
  • In the loop, the rate(100) tells the code to not do any more than 100 loops per second. Since I have a time step of 0.01 seconds, this means 100 loop would take one second—it would run in “real time”.
  • Don’t worry about line 16 (update theta)—at least not for now.
  • Line 18 is the important part. There is a rotate function in Vpython. You need to pick the angle (in this case it’s dtheta which is the angular velocity times the time step), the axis of rotation (the z-axis) and the origin of rotation (the origin).

But it works.

Add a single water

The next step is to add a single ball of water to the end of the sprinkler bar. It’s not going to do anything except to “ride around”. Here’s what that looks like. It’s really the same thing except with that ball of water.

Here is the code—https://trinket.io/glowscript/14e1ecbb7d. Let me just point out the important parts.

If I know the angular position of the sprinkler, I can find the vector from the center of the sprinkler to the end of the sprinkler. It looks like this:

\vec{r} = \left(\frac{L}{2}\right) <\cos\theta,\sin\theta,0>

For each iteration of the loop, I can calculate theta and then use that to calculate “r”. This r is now the new vector position of the ball.

List of balls

Now for the magic. Lists are your friend. I feel like I could write a whole post on just lists—but I want to get right to the good stuff.

In short, a list is a group of things in python. Let me start with an example program.

balls=[]
x=-5
dx=1

while x<3:
  balls=balls+[x]
  x=x+dx

print("balls = ",balls)
print("balls 3 = ",balls[2])

Here are some notes on this code.

  • balls = [] makes an empty list. The name of this list is balls.
  • In the loop, I add a new x value to the list and then update x.
  • At the end, I print the list of balls and the 3rd item in the list (the first item would be balls[0]).

Here’s the output.

But wait! You don’t just have to make a list of numbers. I can make a list with objects too. Check out this version of the code.

balls=[]
x=-5
dx=1

while x<3:
  balls=balls+[sphere(pos=vector(x,0,0), radius=0.1,color=color.cyan)]
  x=x+dx


print("balls 3 position = ",balls[2].pos)

Here is the output.

Boom. Check that out. It’s 8 balls—but in just one list. You can even print out the position of one of the balls (you can’t print the whole list because a sphere() isn’t printable).

Water balls in a list

OK, I think we are ready. Oh, you might not be ready—maybe you need some more practice with lists. Just start playing around and see what happens. Anyway, here is the plan.

  • Make a list of water balls (actually two lists—one for each side).
  • Start the time (t = 0) and a time step of dt.
  • Set a ball time counter. If the time gets to some specified value, then create a ball and add it to the list (both lists).
  • When you create a water ball, set its properties: mass, size, add a trail…oh, and initial velocity. Yup. You can do that.
  • Now let stuff run. I will need to go through each ball list and update the water ball positions, but that’s not too difficult.

Let’s just get to the code. Here it is (also on trinket.io)

GlowScript 2.9 VPython

#Length of sprinkler - just leave this
L=0.1
stick=box(pos=vector(0,0,0), size=vector(L,.05*L,.05*L),color=color.yellow)
cent=sphere(pos=vector(0,0,0), radius=0.03*L, color=color.red)


#CHANGE THIS - rotation rate of sprinkler
omega=2*pi/2


theta=0

#CHANGE THIS to -1 to make balls shoot IN
a=1 

t=0
dt=0.01

#this is just a spacer to make the scene look nice
space=sphere(pos=vector(4*L,0,0),radius=0.001)


#water stuff
water=[]
water2=[]
vwater=.3
tint=0 #this is the "clock" for shooting water

#CHANGE THIS - this is the water ball production rate
f=15 #water per second rate that balls are made


while t<10:
  rate(100)
  r=(L/2)*vector(cos(theta),sin(theta),0)
  r2=-r
  

  if tint>=1/f:
    
    water=water+[sphere(pos=r,radius=0.04*L, color=color.cyan, v=(-1*cross(r,vector(0,0,omega))+a*vwater*r.hat),
    make_trail=False)]
    water2=water2 +[sphere(pos=r2,radius=0.04*L, color=color.cyan, v=(-1*cross(r2,vector(0,0,omega))+a*vwater*r2.hat),
    make_trail=False)]
    tint=0
  for ball in water:
    ball.pos=ball.pos+ball.v*dt
    if ball.pos.mag>3*L:
      ball.v=vector(0,0,0)
      ball.visible=False
      del ball
  for ball2 in water2:
    ball2.pos=ball2.pos+ball2.v*dt
    if ball2.pos.mag>3*L:
      ball2.v=vector(0,0,0)
      ball2.visible=False
      del ball2  
    
  theta=theta+omega*dt
  
  stick.rotate(angle=dt*omega,axis=vector(0,0,1), origin=vector(0,0,0))
  t=t+dt
  tint=tint+dt

This is what the output looks like. Actually, this is an animation for the case of the water shooting inward (since I already had the gif).

Now for some comments on the code.

  • When the water ball gets a certain distance away (I think I set it to 3*L), I change the water ball velocity to vector(0,0,0) and then I make it invisible. Otherwise the view would just keep expanding and it would look weird.
  • I don’t have any other important comments, but I can’t have a one bullet list.

I think that’s good enough. Hope that helps.

Angular Size Lab

Enough was enough. I couldn’t handle going through the chapters in the introductory astronomy course. It was too much material and it was too fast. But I’ve already complained about this in a previous post.

I didn’t have much time to prepare, but I decided to do a lab activity in class. My idea was to have the students build something to measure angular sizes. They could then use this device to measure the size (or distance) of various objects outside. I figured it would be fun to have them actually build things.

So, here is the plan. Step one is to go over the math of angular size. That includes the relationship between the circumference and radius for a circle.

C = 2\pi R

Another important idea is the relationship between the angle in degrees and radians. We need to measure angles in radians, so I also explained this relationship with 360 degrees equal to 2*Pi radians.

The next part was to build an angle measuring device. I’ve done the before in a physics lab, but I wanted something a little simpler. Here’s what I suggested to the students—make some small “flag” that you can hold at arm’s length (so that the distance from eye to flag is constant) and use this to measure angles.

I gave them popsicle sticks and sticky notes and a bunch of other stuff (with the hope that they would come up with their own design). In the end, they had something like this.

This is just a sticky note on a pencil.

The next step is to “calibrate” this instrument. Put your eye a known distance (say 5 meters) from a known length. I had the students use bricks in the wall or put tape on the wall a set distance apart. From this, they can calculate the angular size of the object and make markings on their device. Oh, this diagram might help.

The distance from the eye to the object is R and the length of the object is L. If the object is small compared to the distance, then this length is approximately the same as the arc length of that part of a circle. The value for theta can be determined by dividing L by R.

Now repeat this for another object so that you can turn the angle measuring device into something useful with multiple markings on it. Now we are ready to collect some data.

Here is a large light for the football stadium, you can see it right outside the classroom.

I used Google maps to get the distance to this object (it’s 240 meters) and then had them measure the angular size and calculate the width.

Here are some other questions:

  • What is the angular size of your thumb at arms length?
  • What is the size of a sign on a building across the street?
  • There is a doorway down the hallway. The width of the frame is 0.91 meters. How far is it?
  • What is the angular field of view of your phone’s camera?

Overall, the lab went fairly well. Students have a bunch of trouble with that first step—where they build something. You can tell they don’t feel comfortable without explicit instructions.

Let’s talk about carbon dioxide

OK. Here’s the deal. I have lots of emails about my recent post. The post was a back of the envelope type estimation to see what would happen to the carbon dioxide in the atmosphere if everyone planted a tree.

It’s just a rough approximation. Here’s the post.

https://www.wired.com/story/plant-a-tree-for-climate-change/

Basically, I estimated the size of a typical tree and then figured out how much carbon dioxide you would need to make that tree. After that, I estimated the number of particles per million (ppm) of carbon dioxide.

Here’s the code for my calculations – https://trinket.io/glowscript/f7edb65694

Now for the rest of this. Lot’s of people have sent me comments. If you want to talk about this – here is your chance. Comment on this post. Another option: comment on twitter. Here is a good thread.

If you email me, there’s a good chance I won’t reply. These two options are your best bet.

Intro Astronomy Update

I picked up this introductory astronomy course just a week before classes started. One of my other classes didn’t have enough students in it, so I got this instead. It’s a gen-ed science course for non-science majors. Since it was added late, there are only 12 students in the class.

I’ll be honest—there are some super awesome topics in this intro astronomy course. The historical stories and the “how do we know” stuff is great. HOWEVER, it’s also a really tough class.

I didn’t have time to build something from scratch, so I just went with the order and presentation of topics according to the textbook. This class uses Explorations – an Introduction to Astronomy, 9th ed (Arny, Schneider) McGraw Hill. It’s an OK, text with only a few areas that I don’t agree with. But let’s look at the first 4 chapters:

  • Chapter 1: The sky. Celestial sphere, motions of the sky, seasons, phases of the moon.
  • Chapter 2: Historical astronomy stuff. Mostly, this is the geocentric vs. heliocentric model of the solar system.
  • Chapter 3: Gravity and Motion. BAM. Forces and motion, gravity, escape velocity.
  • Chapter 4: Light and atoms. DOUBLE BAM.

Chapter 3 is bad. I mean, I have other classes that spend about 1/3rd of the semester on forces and motion and they don’t even get to the 1 over r squared version of gravity at any point. I think it’s possible to get students to understand most of the ideas in chapter 3, but not in a chapter-length amount of class time.

Oh sure. You could just tell the students everything they need to know about forces and motion. You could TELL them that a constant force makes an object have a constant acceleration. But research shows that this doesn’t really work. No, this is a tough concept and it’s going to take time to get it figured out.

Chapter 4 is even worse. The interaction between light and matter could be its own separate course. It’s not just a chapter. Oh, on top of that – there are these instructor power point slides. Here are three in a row that go something like this.

  • Light is an electromagnetic wave.
  • Light is also a particle.
  • Which way light manifests itself depends on the situation.

That’s bad. Of course you know I don’t like the whole “light is a particle” thing.

OK, but there are some good things about this course. I have a small enough class that I can put in some extra stuff. We did some of the NextGEN PET units in class, and that went over fairly well. I have also been doing some of the great online labs from University of Nebraska-Lincoln (https://astro.unl.edu/naap/). Those are nice.

One other quick note. I think I am going to skip over all the planet stuff. It seems like it would just turn into a “memorize the density of Saturn” stuff. I really want to get to stars. There are some great stories about how we know stuff about stars.

I’ll keep you updated on the progress of the course.

Blogging Update

Hello there.

Yes, I haven’t posted here in a while. But to make it up to you, I’m going to show you a picture from my drone.

This is a canal in New Orleans. My older son had a soccer game right next to this, so during warm-ups I did a little bit of photography. Actually, these are really weird. You are on ground level and you see a big long hill (there really aren’t many hills in New Orleans). When you walk up the “hill” you see water that could be at a higher level than the ground.

Yes, it’s not a hill. It’s a levee.

It’s definitely odd.

Now for some other random updates.

  • I have been busy as usual. I picked up a couple of freelance posts for a UK magazine. In the edits, all my “meters” were changed to “metres”. I thought that was fun.
  • Blogging on WIRED went pretty well this week. I had two posts – one on a rough estimation of the amount of carbon dioxide capture from planting trees. The other was an estimation of Death Star pieces on the surface of a planet.
  • Another thing I have been working on: making better youtube videos. I have made some modest gains, but I still need more work.
  • I was thinking about doing a youtube live stream event, but I’m afraid no one would show up.
  • Finally, my oldest daughter moved to Japan. I’m glad she made it there.

Finding the Electric Field from the Electric Potential (difference)

I’m way behind on this one. My plan was to write up something when this question came up in the summer section of algebra-based physics. It was a great question and deserved a full answer. Also, I wanted to make this a tutorial on trinket.io—but maybe I will do that after I write about it here.

So, here’s how it goes. We start off the semester calculating the electric field due to a point charge and then due to multiple point charges (you know—like 2). After that we get into the electric potential difference. Both the potential and the field follow the superposition principle. If you calculate the value due to two charges individually, you can add these together to get the total field or potential.

But there is a big difference. The electric potential difference is a scalar value where as the electric field is a vector. That means that when using the superposition with electric fields, you have to add vectors. Students would prefer to just add scalars—I’m mean, that seems obvious. Does that means that you could just find the electric potential difference for some set of point charges and then use that potential to find the electric field? Yup. You can. And we will.

Let me start with the definition of the electric potential difference. Since it’s really just based on the work done by a conservative force (the electric field), this looks a lot like the definition of work.

\Delta V = -\int_a^b \vec{E}\cdot d\vec{r}

Yes, that’s an integral. Yes, I know I said this was for an algebra-based course. But you can’t deny the truth. The “a” and “b” on the limits of integration are the starting and ending points—because remember, it’s really an integral. Also, the “dr” is in the direction of the path from a to b. It doesn’t technically have to be a straight line.

What about an algebra-based course? Really, there are only two options. The most common approach gives the following two equations for electric potential.

V = k\frac{q}{r}

\Delta V = -E\Delta r \cos \theta

The first expression is the electric potential of a point charge with respect to infinity (so the starting point for the integral is an infinite distance away). The second expression is the change in electric potential due to a constant electric field when there is an angle between the field and the displacement.

Oh wait! I forgot to list the value of k. This is the Coulomb constant.

k = 9\times 10^9\text{ N*m}^2\text{/C}^2

Students can understand the second expression because it’s pretty much the same as the definition of work (for a constant force). The first equation is mostly magic. The one way you can show students where it comes from is to do a numerical calculation of the electric potential difference since they can’t integrate. Did I write about that before? I feel like I did.

Ok, that’s a good start. Now for a problem.

Electric potential due to two point charges

Suppose I have two charges that are both located on the x-axis. Charge 1 is at the origin with a charge of 6 nC. Charge 2 is at x = 0.02 meters with a charge of -2 nC. Here’s a diagram—just for fun.

Let’s start off with the electric potential—as a warm up. What is the value of the electric potential (with respect to infinity) at the location of x = 0.02 meters? Using the equation above for the electric potential due to a point charge, I need to find the potential due to point 1 and then the potential due to point 2—then just add them together (superposition).

First for point 1.

r_1 = 0.02\text{ m} - 0\text{ m} = 0.02

V_1 = k\frac{q_1}{r_1}

Now for point 2.

r_2 = 0.02\text{ m} - 0.01\text{ m} = 0.01

V_2 = k\frac{q_2}{r_2}

This gives a total electric potential:

V = V_1 + V_2 = k\left(\frac{q_1}{r_1} + \frac{q_2}{r_2}\right) = 175.3\text{ Volts}

Finding the Electric Field

Now to find the electric field at that same point. I don’t know how to say this in a nice way, so I will just say it. Since the electric potential is calculated based on an integral of the electric field, the electric field would be an anti-integral. Yes, this means it’s a derivative. But wait! The electric field is a vector and the electric potential is a scalar? How do you get a vector from a scalar? Well, in short—it looks like this.

\vec{E} =-\nabla V

That upside delta symbol is the del operator. It also looks like this:

\nabla V = \frac{\partial V}{\partial x}\hat{x} + \frac{\partial V}{\partial y}\hat{y} + \frac{\partial V}{\partial z}\hat{z}

Yes, those are partial derivatives. Sorry about that. But you do get a vector in the end. But how can we do this without taking a derivative? The answer is a numerical derivative. Here’s how it works.

Suppose I find the electric potential at three points on the x-axis. The first point is where I want to calculate the electric field. I will call this x_0. The next point is going to be a little bit higher on the x-axis at a location of x_0+dx. The final point will be a little bit lower on the x-axis at x_0-dx. Maybe this diagram will help.

When I take these two end points (not the middle one), I can find the slope. That means the x-component of the electric field will be:

E_x(x_0) = -\frac{V(x_0+dx)-V(x_0-dx)}{2dx}

Let’s do this. I’m going to find the x-component of the electric field at that same location (x = 0.02 meters). I don’t want to write it out, so I’m going to do it in python. Here is the link (I wish I could just embed the trinket right into this blog post).

Umm..wow. It worked. Notice that I printed the electric field twice. The first one is from the slope and the second one is by just using the superposition for the electric field. Yes, I knew it SHOULD work—but it actually worked. I’m excited.

Also, just for fun—here is a plot of the electric potential as a function of x. The negative of this slope should give you the x-component of the electric field.

Here you can see something useful. Where on this plot is the electric field (the x-component) equal to zero? Answer: it’s where the slope of this plot is zero (yes, it’s there). Remember, just because the electric field is zero that doesn’t mean the electric potential is zero.

Homework

How about this? See if you can find the electric field due to these two charges at a location y = 0.01 and x = 0.0 meters. This is right on the y-axis, but now the electric field clearly has both an x and a y-component. That means you are going to have to do this twice.

MacGyver Season 3 Episode 18 Science Notes: Murdoc + Helman + Hit

I honestly don’t know how I skipped over this episode with my MacGyver science notes. Oh well, let’s finish this up. There aren’t too many hacks in this episode, so this won’t be too long.

One Way Mirror

Murdoc makes a great point. Is it a one way mirror or a two way mirror? The main idea is that Murdoc can’t see through the glass, but the other people can see through to view what Murdoc is doing.

These things aren’t magic. At the most basic level, a “one way mirror” is just a plane of glass. When light hits glass, some of it is reflected and some of it is transmitted. If you are on one side of the glass and there is WAY more reflected light coming back at you than the light transmitted from the other side, then you can’t see that transmitted light. The glass would look like a mirror.

This is exactly what happens when you are inside a house at night with the lights on. The lights reflect too much and there isn’t much light from outside coming in, so you just see a reflection. It would look like this.

If you are outside on a dark night, the opposite is true. You can see INTO the house.

So, for the one way mirror, you need a glass separating two rooms. The dark room is the room with the observers and the light room is where the prisoner sits.

Here is an older post with more details about seeing through windows.

Pulley Skateboard Battering Ram

This is a classic simple machine. The key to all simple machines is that you can make a system that pulls over a greater distance and produces a greater force (or you can do it the opposite of this).

In this case, MacGyver makes a compound pulley. You need two pulleys. If you run the string through these two pulleys, you can make two different distances. The distance one side is pulled is twice the distance of the other side. Here is a diagram.

Yes, that’s a rather crude sketch—I did it fairly quickly. Here is a video that walks through the setup. I mention that there are two ways to set up this skateboard battering ram, this only covers one method.

Here is a much more detailed post on pulleys.

Stopping a Truck with a Truck

MacGyver uses a winch cable to connect their truck to Murdoc’s truck. They then slam on the breaks. So, would this work? Yeah, probably.

Assuming the two vehicles have the same material for the tires, then they would have the same coefficient of friction. A basic model for friction says that the frictional force is proportional to the force the ground pushes up on the object (we call this the normal force).

F_f = \mu N

Since both cars are on flat ground, the normal force is equal to the car’s weight. That means the heavier car would have a greater frictional force. Yes, I’m making some other assumptions about the tires “locking up”—but still, this is plausible.

Even if the frictional force wasn’t enough to stop the truck, the cable is attached to the side of Murdoc’s truck. This side force would rotate the truck and also prevent it from driving straight.

MacGyver Season 3

Here is a list of all of my science notes for season 3

MacGyver Season 2

Here is a collection of all my science notes for Season 2.

Here is the list of notes for Season 1