In this post I am going to show an easy and quite efficient way to perform the well-known view frustum culling for axis-aligned bounding boxes (AABB from now on).

# Category Archives: Maths

# 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.

# Gaussian distribution

The basis function for the generation of kernels (convolution matrices) for image low-pass filtering or smoothing is the Gaussian distribution. The function has the form:

with parameters x, mean and standard deviation.

Continue reading