Вы находитесь на странице: 1из 3

A study about periodical boundaries in geometrical shapes applied to gaming

Bruno Sanns Mota March 24, 2011


Abstract Geometry is quite interesting for most of humans. We have to deal with it every day. The common sense of line, area and volume are embedded to our living experience. But when we do attempt to create new situations we do not live in, some astounding fancies may arise and we can drop our jaws. This paper is either beautiful and can unveil some characteristics we can build with a simple sheet of paper.

Motivation for this work

Once upon a time, I had to simulate the interaction of innite particles conned within two dimensions - an innite plane. I learned a technique called periodic boundaries that let this simulation to be done. But there are some consequences and it opens a chance to study general cases for this periodicity. Let me explain it clearly: I guess youve had a game called Snake. Do you remember that in some versions of the game we could cross the wall to the other side? THIS is what I mean by periodical boundaries: if the snake had an odometer, it could go innitely to the same direction and its distance would just rise and rise. But if we try to make a formalism for this situation? What will happen? Lets analize the simplest case possible: a periodic line.

1.1

A periodic line

Ill start with a simple case and then Ill generalize. Suppose we have a line of length L. This line will be centered at the origin of the axis of real numbers, so there will be half of this line to either sides of the origin, ok? Rigorously thinking, we can write: L L x } 2 2 This is an easy thing to see: a rope, for instance. The concept of periodicity applied to a line is simply done with: S = {x |

Geometric way to show Consider A be the point W ( L ) and B be W (+ L ) Its easy to arm (and 2 2 believe) that: AB Using basic calculus lim W (x) = W (x)

x L + 2

In other words: when you reach the end of your way along the line, you come back to the beginning. Fun, isnt it? Ill apply some rigour now. Ill call P eriodicityConsequence(geometric object) a function that can transform one object into another one. Open up your eyes, and be abstract for the next armation: P eriodic(finite line) = circumference Did you get? If not, just bend the rope and glue the ends. Easy like this. When you have regular geometrical shapes that perfectly t with ease, one can easily nd rules for periodicity. A two-dimensional object will be treated in next subsection.

1.2

The generalized square

A square is a two-dimensional shape that has four sides with the same length, vertices with same angle, all of them /2 radians. I guess I do not need to draw. Althought I do not need to use such resources to explain periodicity in a square - or rectangle, if you prefer, Ill do it. Because this formalism will be the very only way to generalize periodicity for weird and ugly shapes. Lets write a formal set for a square? A square S is a subset of 2 Ill dene it this way rst: S = {(x, y) 2 | (L/2 x L/2) (L/2 y L/2)} We can also write it as the geometric place that resides within four regions of the 2D space: Q1 = {(x, y) | x +L/2} Q2 = {(x, y) | y +L/2} Q3 = {(x, y) | x L/2} Q4 = {(x, y) | y L/2} So,

S = Q1 Q2 Q3 Q4 Now, some aspects are becoming clear. With basic analytic geometry, one can arm that four nite lines will border this space. They are: x = +L/2 y = +L/2 x = L/2 y = L/2 Now we have to recall two colleagues: normal versor of a certain line ( ) and n tangential versor (). Lets enunciate them: t ] [ f = 1 , t 2 1 + f 2 1 + f = 0 t n = +1 t n z

2 3

Case of study: a circle Generalization

1 Unary

vector pointing out of paper

Вам также может понравиться