Author Archives: Cameron Pittman

an even closer look at air resistance

I took a deeper look at my experiment from the last few posts and made a couple graphs.

The first details the difference between predicted and actual values for the magnitude of the cube’s velocity as it flies through the air:

Notice how the actual data strangely has a small dip at the beginning. I’m not sure where that’s coming from. Let’s take a look at its X and Y velocities:

The predicted values run a little bit farther than the actual values because I let my simulation (i.e. Excel formula) run a little bit longer than it takes for the cube to hit the ground.

There seems to be a weird jolt around 0.2 s. I’m not really sure what’s going on here. If you’ve got any ideas, please let me know.

I also looked into the difference between predicted and actual values for the height of the cube as it flies through the air:

I had to eyeball the height of the cube as it fell, which led to the wonky graph line. Regardless (and unsurprisingly), it still appears as if it takes a little bit longer for the cube to hit the ground than is predicted. It’s safe to assume that this is because of air resistance.

Any ideas about what’s going on here? Any ideas for new tests? Let me know!

I apologize for the dearth of posts lately. School started this week (!) so I’ve been insanely busy. I’m planning on giving my students their first hands-on experience with Portal 2 in about two weeks. They’ll be running labs that have been almost a year in the making. Of course, anything and everything that happens with portals in class will be documented here. Stay tuned.

the velocity limit of portals

Hello everyone coming from Singularity Hub! Check out my demonstration videos for a good overview of what I’m trying to do. And for the educators out there, take a look at my lesson plans and let me know what you think!

After my last post about the effect of portals on cube velocity, I was asked about the actual velocity limit for cubes moving through portals. It’s easy to calculate. Looking at my Portal Velocity Limit Spreadsheet, it’s clear that any cubes dropped farther than about 8 panels were slowed to the same velocity as they passed through the portals. To get an idea about the portal velocity limit, we’ll start with the equation:

v_{max}=\frac{\Delta x_{max}}{t}

From the spreadsheet, we’ll be using \Delta x_{max}=11.25 panels and t=1.53s, which gives us v_{max}=7.35 panels/s.

Of course, that doesn’t take air resistance into account, so we really just found an average velocity. To find the instantaneous velocity of a cube as it passes through the portals, we’ll be using the console command, “physics_debug_entity.” Check out the video below.

It looks like our results make sense. We would expect the instantaneous velocity of a cube when it first leaves the portal to be higher than its average velocity after being slowed down by air resistance.

do portals slow you down?

Note: for folks coming in from Wired, here’s the thermodynamics of the ideal gas law video.

Fun with slow motion cubes, graphs, and data! I like this video a lot.

Console Commands:

sv_cheats 1 (only needs to be done once)
noclip (lets you fly around the room)
phys_timescale 0 (freezes objects in the game)
phys_timescale 1 (lets objects move normally again)
phys_timescale 0.25 (slow motion cubes!)
impulse 200 (removes/replaces portal gun)
bind “z” “noclip” (an example of linking console commands to keyboard shortcuts)

Tagged , , , ,

hello wired

Hello folks visiting from Wired’s Game Life! Glad you could stop by. Here’s a little more about the thermodynamics of the ideal gas law.

I’m adding new videos and demonstrations as quickly as I can. You can find most of them linked at the top. Check back later for another look at the way friction slows down airborne cubes. And if you’re an educator, check out my lesson plans on Teach with Portals. I’d love to get any feedback you might have!

Tagged , ,

conservation of momentum and collisions

Do mass and velocity play a role in the outcome of collisions? Let’s find out.

We’ll be colliding three objects: a cube, a sphere, and a turret. A cube has a mass of 40 kg, a sphere has a mass of 75 kg, and a turret has a mass of 100 kg (found by using the console command physics_debug_entity while looking at an object). If all goes well, the object with the larger momentum due to its larger mass or greater velocity should send the other object flying backwards as the result of their collision.

Test 1: Two cubes of the same mass hitting at the same velocity.

Their identical momenta cancel out.

Test 2: A sphere striking a lighter cube at the same velocity.

The sphere’s larger momentum causes the cube to fly backwards.

Test 3: A cube striking a turret.

The turret has a larger mass and its momentum causes the cube to fly backwards.

Test 4: A sphere striking a turret.

The turret has a slightly larger mass and its momentum causes the cube to fly backwards.

Test 5: A fast cube strikes a slower cube.

The fast cube’s greater momentum knocks the slower cube backwards.

It looks like mass and velocity are significant factors in collisions and handled correctly (at least superficially) by the Source engine.

Tagged , , , ,