ArticleslgStudy

computer science

Binary space partitioning

Binary space partitioning is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Binary space partitioning rather than just read about it. In short: In computer science, binary space partitioning (BSP) is a method for space partitioning which recursively subdivides a Euclidean space into two convex sets by using hyperplanes as partitions. This process of subdividing gives rise to a representation of objects within the space in the form of a tree data structure known as a BSP tree.

Binary space partitioning — main illustration
Binary space partitioning — illustration

Key takeaways

  • Binary space partitioning belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Binary space partitioning to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Binary space partitioning from memory before moving on to harder problems.

Reference excerpt

In computer science, binary space partitioning (BSP) is a method for space partitioning which recursively subdivides a Euclidean space into two convex sets by using hyperplanes as partitions. This process of subdividing gives rise to a representation of objects within the space in the form of a tree data structure known as a BSP tree. Binary space partitioning was developed in the context of 3D computer graphics in 1969. The structure of a BSP tree is useful in rendering because it can efficiently give spatial information about the objects in a scene, such as objects being ordered from front-to-back with respect to a viewer at a given location. Other applications of BSP include: performing geometrical operations with shapes (constructive solid geometry) in CAD, collision detection in robotics and 3D video games, ray tracing, virtual landscape simulation, and other applications that involve the handling of complex spatial scenes.

History

Early history (1969-1989) In 1969, the US Air Force published a study describing how carefully positioned planes in a virtual environment could be used to accelerate polygon ordering. This technique made use of depth coherence, which states that a polygon on the far side of the plane cannot, in any way, obstruct a closer polygon. This was used in flight simulators made by General Electric and Evans & Sutherland. However, the creation of the polygonal data organization was performed manually, by the scene designer. In 1980, Henry Fuchs et al. extended this initial idea to the representation of 3D objects in a virtual environment by using planes that lie coincident with polygons to recursively partition the 3D space. This provided a fully automated and algorithmic generation of a hierarchical polygonal data structure known as a Binary Space Partitioning Tree (BSP Tree). The process took place as an off-line preprocessing step that was performed once per environment/object. At run-time, the view-dependent visibility ordering was generated by traversing the tree. The following year, Bruce Naylor's PhD thesis provided a full development of both BSP trees and a graph-theoretic approach using strongly connected components for pre-computing visibility, as well as the connection between the two methods. BSP trees as a dimension-independent spatial search structure were emphasized, with applications to visible surface determination. The thesis also included the first empirical data demonstrating that the size of the tree and the number of new polygons were reasonable (using a model of the Space Shuttle). In 1983, Henry Fuchs et al. described a micro-code implementation of the BSP tree algorithm on an Ikonas frame buffer system. This was the first demonstration of real-time visible surface determination using BSP trees. In 1987, Bruce Naylor and William Thibault described how arbitrary polyhedra may be represented using a BSP tree as opposed to the traditional b-rep (boundary representation). This provided a solid representation vs. a surface based-representation. Set operations on polyhedra were described using a tool, enabling constructive solid geometry (CSG) in real-time. This was the forerunner of BSP level design using "brushes", introduced in the Quake editor and picked up in the Unreal editor.

1990s In 1990, Naylor, Thibault and John Amanatides provided an algorithm for merging two BSP trees to form a new BSP tree from the two original trees. This provides many benefits including combining moving objects represented by BSP trees with a static environment (also represented by a BSP tree), very efficient CSG operations on polyhedra, exact collisions detection in O(log n * log n), and proper ordering of transparent surfaces contained in two interpenetrating objects (has been used for an x-ray vision effect). The following years saw several notable explorations of BSP. In 1991, Seth J. Teller and Carlo H. Séquin proposed the offline generation of potentially visible sets to accelerate visible surface determination in orthogonal 2D environments, while another paper published in IEEE Computer Graphics and Applications described an efficient method of performing front-to-back rendering from a BSP tree, rather than the traditional back-to-front approach. They utilized a special data structure to record, efficiently, parts of the screen that have been drawn, and those yet to be rendered. This algorithm, together with the description of BSP trees in the standard computer graphics textbook of the day (Computer Graphics: Principles and Practice), was used by John Carmack in the making of Doom. In 1992, Teller's PhD thesis described the efficient generation of potentially visible sets as a pre-processing step to accelerate real-time visible surface determination in arbitrary 3D polygonal environments. This was used in Quake, contributing significantly to the game's performance. In 1993, Naylor answered the question of what characterizes a good BSP tree. He used expected case models (rather than worst-case analysis) to mathematically measure the expected cost of searching a tree and used this measure to build good BSP trees. Intuitively, the tree represents an object in a multi-resolution fashion (more exactly, as a tree of approximations). Parallels with Huffman codes and probabilistic binary search trees are drawn. Hayder Radha's Ph.D. thesis described (natural) image representation methods using BSP trees. This includes the development of an optimal BSP-tree construction framework for any arbitrary input image. This framework is based on a new image transform, known as the Least-Square-Error (LSE) Partitioning Line (LPE) transform. Radha's thesis also developed an optimal rate-distortion (RD) image compression framework and image manipulation approaches using BSP trees.

Overview

… excerpt ends here. Continue reading the full article.

Illustrations

Binary space partitioning: The process of making a BSP tree
The process of making a BSP tree
Binary space partitioning: An example of a recursive binary space partitioning quadtree for a 2D index
An example of a recursive binary space partitioning quadtree for a 2D index
Binary space partitioning illustration
Binary space partitioning illustration
Binary space partitioning illustration

Worked examples

Example 1 — a first encounter with Binary space partitioning

Start with the simplest possible case. Write down what Binary space partitioning claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Binary space partitioning before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Binary space partitioning ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Binary space partitioning

In research
Binary space partitioning appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Binary space partitioning in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Binary space partitioning is common in secondary-school and first-year university syllabi. It links to neighbouring topics 3D computer graphics, Binary trees, Geometric data structures, so understanding it makes those chapters shorter.
In everyday life
Look for Binary space partitioning outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Binary space partitioning” →

How to study Binary space partitioning in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Binary space partitioning means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Binary space partitioning out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Binary space partitioning in simple terms?

In computer science, binary space partitioning (BSP) is a method for space partitioning which recursively subdivides a Euclidean space into two convex sets by using hyperplanes as partitions. This process of subdividing gives rise to a representation of objects within the space in the form of a tre…

Why does Binary space partitioning matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Binary space partitioning?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Binary space partitioning.

Tags

  • 3D computer graphics
  • Binary trees
  • Geometric data structures

Keep exploring