Skip to content

Commit aa28518

Browse files
committed
Some typo fixes and dits.
1 parent f08372e commit aa28518

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

_posts/2014-07-06-Pong-Physics.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ layout: post
55
comments: true
66
---
77
Pong is one of the earliest arcade games, written to run in very simple hardware but with some interesting
8-
properties with regards to its physics system. Basically, when the ball collides with the paddle it's direction
9-
is inverted and it starts going to the other side of the screen. However, Pong itself and its several clones
10-
implement this in way that the ball behaves differently accordingly to the part of the paddle it hits. This is
11-
exactly where things get a bit more interesting.
8+
properties with regards to its physics system. Basically, when the ball collides with the paddle its direction
9+
is inverted and it starts going to the opposite side of the screen.
10+
11+
However, Pong itself and its several clones implement this in a way that the ball behaves differently according
12+
to the part of the paddle it hits. This is exactly where things get a bit more interesting.
1213

1314
<div style="text-align:center" markdown="1">
1415
![Ellipse Normals](/images/ellipse-normals.png)
@@ -24,12 +25,10 @@ The behaviour I wanted for the reflections is illustrated by drawing above. The
2425
the current direction vector, surface normal and reflection vector, respectively.
2526

2627
What happens here is that the normals of the surface will affect the output angle of the ball, thus giving the player
27-
more control on the player morecontrol on where they want the ball to go.
28+
more control on the player more control on where they want the ball to go.
2829

29-
The behaviour can be achieve by applying the [vector form equation of a specular reflection](http://en.wikipedia.org/wiki/Snell%27s_law#Vector_form).
30+
The behaviour can be achieved by applying the [vector form equation of a specular reflection](http://en.wikipedia.org/wiki/Snell%27s_law#Vector_form).
3031
To do that, we need to evaluate the equation of the normals at a given **t**, where **t** is the normalized height where the
3132
ball hitted the paddle.
3233

33-
With this last piece, we can finally put our vectors back into the reflection equation and obtain our new direction vector.
34-
3534
And that's pretty much it. Have fun!

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy