Building a BSP Tree
•
•
Typedef struct {
polygon root;
BSP_tree *backChild, *frontChild;
} BSP_tree;
BSP_tree  *makeBSP(polygon *list)
{
if( list = NULL) return NULL;
Choose polygon F from list;
Split all polygons in list according to F;
BSP_tree* node = new BSP_tree;
node->root = F;
node->backChild = makeBSP( polygons on front side of F );
node->frontChild = makeBSP( polygons on back side of F );
return node;
}
Graphics Hardware

Vector/Raster Graphics