# Cubemaps

Cubemap textures are a mechanism provided by GPUs that allows us to develop several rendering techniques such as skyboxes, skylight illumination, dynamic reflection of the environment, etc. With them we can map the visible environment onto the 6 faces of a cube and later easily query this information from a shader program.

# Point-Plane classification

In this post I’m going to explain how to classify a point with respect a plane, that is, given a certain plane and a point, we will see how to decide whether the point is laying on the plane surface, or it is located on the positive or negative half-spaces defined by the plane.

# Extracting frustum planes from modelview-projection matrix

In this post I’m going to explain how to extract the parameters of each frustum plane in the local space of the object with a certain modelview-projection matrix. Knowing the frustum planes may be useful in some cases. The first one that comes to my mind is to perform frustum culling, which I will explain soon in a separated post.

# Logarithms to arbitrary base

The mathematics library in many languages ( e.g. C++) only provides us with natural (base e) logarithms and base 10 logarithms.

When programming, we sometimes need to perform logarithmic calculations that use an arbirary base. It is common, for instance, to need base 2 logarithms in order to work with sizes of binary trees, or base 8 logarithms for octrees.

The logarithm to an arbitrary base b, logb(x), can be computed from the logarithms of x and b with respect to an arbitrary base k using the following formula:

where k could be ‘e’ or ’10′, which allows us to calculate logarithms to an arbitrary base using the standard maths library functions.