# Binary Space Partitioning - Generation

Generation

The canonical use of a BSP tree is for rendering polygons (that are double-sided, that is, without back-face culling) with the painter's algorithm. Such a tree is constructed from an unsorted list of all the polygons in a scene. The recursive algorithm for construction of a BSP tree from that list of polygons is:

1. Choose a polygon P from the list.
2. Make a node N in the BSP tree, and add P to the list of polygons at that node.
3. For each other polygon in the list:
1. If that polygon is wholly in front of the plane containing P, move that polygon to the list of nodes in front of P.
2. If that polygon is wholly behind the plane containing P, move that polygon to the list of nodes behind P.
3. If that polygon is intersected by the plane containing P, split it into two polygons and move them to the respective lists of polygons behind and in front of P.
4. If that polygon lies in the plane containing P, add it to the list of polygons at node N.
4. Apply this algorithm to the list of polygons in front of P.
5. Apply this algorithm to the list of polygons behind P.

The following diagram illustrates the use of this algorithm in converting a list of lines or polygons into a BSP tree. At each of the eight steps (i.-viii.), the algorithm above is applied to a list of lines, and one new node is added to the tree.

The final number of polygons or lines in a tree is often larger (sometimes much larger) than the original list, since lines or polygons that cross the partitioning plane must be split into two. It is desirable to minimize this increase, but also to maintain reasonable balance in the final tree. The choice of which polygon or line is used as a partitioning plane (in step 1 of the algorithm) is therefore important in creating an efficient BSP tree.

### Other articles related to "generation, generations":

Other Generations
... The term generation is sometimes applied to a cultural movement, or more narrowly defined group than an entire demographic ... Some examples include The Beat Generation, a popular American cultural movement that most social scholars say laid the foundation of the pro-active American ... The Beat Generation is between the Silent Generation and the Baby Boomers ...
Generation Name
... Generation name, variously zibei or banci, is one of the characters in a traditional Chinese name, and is so called because each member of a generation (i.e ... siblings and cousins of the same generation) share that character, unlike surnames or given names ... Where used, generation names were usually given only to males, although this does vary from lineage to lineage and has changed over time ...
Strauss–Howe Generational Theory - Timing of Generations and Turnings
... Generation Type Birth years Formative era Late Medieval Saeculum Arthurian Generation Hero (Civic) 1433–1460 (27) Unraveling Retreat from France Humanist Generation ... Generation Hero (Civic) 1901–1924 (23) Unraveling World War I/Prohibition Silent Generation Artist (Adaptive) 1925–1942 (17) Crisis Great Depression ... is because according to the chart, the Civil War came about ten years too early the adult generations allowed the worst aspects of their generational personalities to come through and the ...
Holden Commodore
... Opel continued to provide the basis for future generations until the launch of the fourth generation in 2006, which deployed an Australian developed platform ... crossover were provided by the now discontinued third generation architecture ... Prior to the 1988 onwards second generation Commodore, the Holden was positioned a full class below the full-size Falcon ...
Atypical Antipsychotic - Medical Uses - Effectiveness
... There has been considerable debate about whether second-generation antipsychotic drugs are more effective than first-generation antipsychotic drugs ... been suggested that there is no validity to the term "second-generation antipsychotic drugs" and that the drugs that currently occupy this category are not identical to each ... do not improve specific symptoms, have no clearly different side-effect profiles than the first-generation antipsychotics, and are less cost effective ...

### Famous quotes containing the word generation:

This generation has come into the world fatally late for some enterprises. Go where we will on the surface of things, men have been there before us.... But the lives of men, though more extended laterally in their range, are still as shallow as ever.
Henry David Thoreau (1817–1862)

One generation passeth away, and another generation cometh: but the earth abideth for ever. The sun also ariseth, and the sun goeth down, and hasteth to the place where he arose.
Bible: Hebrew Ecclesiastes, 1:4-5.

Ernest Hemingway took the title The Sun Also Rises (1926)

Today’s comedian has a cross to bear that he built himself. A comedian of the older generation did an “act” and he told the audience, “This is my act.” Today’s comic is not doing an act. The audience assumes he’s telling the truth. What is truth today may be a damn lie next week.
Lenny Bruce (1925–1966)