Thursday, March 7, 2013

Dividing by Zero

Usually, dividing by zero is a problem.

Like most problems, it can be solved if you put your mind to it:  Start at the beginning and take it one step at a time.  Such is the beauty of mathematics:  If each step is correct, and each prior true, then the result is also true.

The definition of division is that it is the inverse of multiplication, so, to understand division, we must first study multiplication.  Multiplication may be represented as a function:

mult(x, y) ≡ x × y = z

This maps a two-dimensional domain onto a one-dimensional co-domain, causing degeneracy.  If we invert multiplication, this mapping is reversed, and each point of the inverse's one-dimensional domain maps to an at-least-one-dimensional subspace of its co-domain.

mult-1(z) = {x, y} with x × y = z

For mult-1 to be usable as a function, we must add a constraint, reducing the co-domain's dimensions by one.  This is why division has a second input:

div(z, y) ≡ ÷ y ≡ mult-1(z) with y constrained to the given value.
i.e. div(z, y) ≡ mult-1(z) | y

However, if y = 0, then z = 0, independent of x, and the constraint fails to reduce the co-domain's dimensions.

In essence, the problem is that multiplication by zero causes information to be lost.  The salient solution is then to keep the information for as long as possible.

Because multiplication is associative, there is a simple methodology; simply remove the following axiom:

x × 0 = 0, for all x

Further investigation will need to be done to determine whether this solves all the problems (e.g. tan(π/2) = ?), whether this arithmetic is a useful abstraction of reality, and how it fits in with Aleph-null, Peano arithmetic, and other such mathematical concepts.

Wednesday, February 13, 2013

Space War: The New Frontier

Recently, I suddenly realized that creating a game similar to Spacewar, or rather Star Control, would be pretty simple in GameMaker Studio.

Unfortunately (wink), I discovered that it now has a built-in 2-D rigid-body physics engine.  Cue lots of experimentation:
 Fig 1: Plasma beam fired while spaceship is rotating.

Fig 2: Ship rotating because of recoil from firing mass driver.

 Fig 3: Experimenting with graphics effects.

Monday, January 28, 2013

Physics Trouble

As you might have noticed, I made some changes to the first post of my physics sequence, and although I had posted a second post, I removed it after a few days.

The reason is that I have been re-evaluating some of the decisions that I made, and doing lots of mathematics.  Pages and pages full of equations.  It's ridiculous, it's not even funny. ;^)

I have managed to write the potential-field function in matrix form, and this has shown me several further possibilities on how the physics engine can be used, and also some ways to optimize it and to adapt it to run on the GPU.  And, furthermore, it could run as a part of the graphics rendering pipeline without slowing it down.

So, my physics sequence is on hold until I have managed to organize my thoughts and tested them mathematically.  If you're getting bored, go play Path of Exile. :^J