# Determining which point is further along a direction vector

I am attempting to write a frustum culling algorithm simply by testing axis aligned boxes against a plane, while researching this i came across an article here: enter link description here The trouble i am having is determining which points are furthest along the normal of the plane as illustrated here:

For each box i need to determine which corner or of the box is furthest along the direction normal of the plane. The pseudo-code on the website has no meaning to me as my box class is structured differently, any help would be appreciated.

• Can't you just compute dot products between normal and every corner and select a corner with highest (or lowest) result? Dec 6, 2016 at 13:39

In 3d games you do not test bounding boxes against camera's line of sight. Instead, you take your ViewPerspective matrix and do manipulations with it.

The most common way is to extract 6 planes from ViewPerspective matrix and test bounding box against all 6 planes. Test will show whether object is inside frustum or not.

For reference:

• Thank you for your response, i must have not explained enough, i am testing box intersections with the planes of the frustum, so after reading the links you provided i am achieving the same result through a slightly different method. However those links may still prove useful because i am having trouble calculating the planes through a different method here: gamedev.stackexchange.com/questions/134067/… Dec 7, 2016 at 13:58

Considering you know a point of the plane (Camera position) and the normal, I would just do the dot product for each corner.

For example if O is the camera position, n the normal vector and P1 a corner of the box, that would lead to do the operation : (P1 - O) . n.

Do that for each corner, the one with the higher result will be the further along the normal.