Sunday, June 8, 2014

Physics for fun? (Portal)

I wound up in a discussion the other day, in an online forum, about the physics of the video game series Portal. If you're not familiar, it's a puzzle game where the only "gun" you have places portals on walls, floors, and ceilings.

This short video, which was what had gotten the conversation going the other day, gives a decent impression of the basic idea.

I'll detail some of the things they got wrong in a bit. For you folks who know "there is science to be done," yes, the portals are the wrong shape. Let's move on.

Now, a little actual physics discussion. The question the other day was, "wouldn't he keep accelerating and fly past the portals?"

After drawing out some diagrams, coming to premature conclusions, and continued discussions I believe I have the answer.

I'll give you the answer, then go into the rationalization.

Wouldn't the kid continue accelerating until he missed the portal?
Yes, after his second pass through the portals.

"Look at you flying through the air like a majestic eagle...piloting a blimp."

Why?
One of the things the eponymous portals do is reorient your velocity as you pass through them, based on the relative orientations of the two portals. In the video you can see the kid falls through one portal downward (floor) and proceeds to fly sideways out of the perpendicular portal (wall). Not only has he turned, so has his momentum.

This is key to why he would miss the bottom (down) portal on his second pass. His momentum from his first fall hurls him out from the wall portal back over the floor portal, while flying outward gravity is now perpendicular and pulls him down into the floor portal. This is the important bit both his initial velocity and second fall velocity rotate 90°. (The portals are at 90° to each other.)

For his second fall, from wall portal to floor portal, he is flying sideways again. This flight has only one falls worth of velocity away from the wall. Why? Because the velocity from the first fall has also rotated and is now oriented up (to the observer) away from the floor portal and gravity.

His first fall is now an upwards fall and his second a sideways fall.

This means that gravity must decelerate his upwards velocity then accelerate him downward. The whole time he is flying sideways. This translates into an arc which will land him at the edge of the floor portal.

Now, I would be remiss if I tried to get away with throwing out assertions, especially about Portal, without experimentation. I loaded up Portal 2 and both Chell and a Companion Cube (a beach ball sized box with a heart on it) pass through exactly twice before landing past the floor portal. Chell is an adult, larger than the kid, and a companion cube smaller.

I'm marking this down, huge success.

Continuing thoughts
If the kid could continue flying through as shown:

Would the height difference between his initial fall and subsequent falls generate a "wobble?"

No comments:

Post a Comment