Game Mathematics

This is a section devoted to the mathematics behind game development.

This is also by no means the best method of doing these things. These are only the ways I have tested and found to work for what I need them for. They are not optimized for speed and are presented here for clarity.

In the interests of being useful for any and all programming languages and styles, I have left each in the mathematical notation and not in coded form, so that you may code each method as you wish. However, if you want an example of how to implement these equations, head on over to my GameDev section to find working demos.

Index of Equations

Point on a Sphere

Equation for any point on a sphere:
r = sphere's radius
Az = angle on the z axis
Axy = angle on the xy axis
x, y, z are the coordinates in 3D space

x = r * cos(Az) * sin(Axy)
y = r * sin(Az) * cos(Axy)
z = r * sin(Az)