6 Solid Modeling

Computer Graphics · Unit 6 · 4 hrs

Solid Modeling

Exam-focused notes for Solid Modeling (Computer Graphics, CSC214): what the TU syllabus asks and how it has actually been tested, with 7 solved past questions from this unit.

Solid Modeling in short

Solid modeling represents an object as a complete, unambiguous description of its solid interior, not just its visible surface, so that any point in space can be classified as inside, outside, or on the object. This chapter covers the main ways a solid model is built and organised: sweeping a 2D shape through space, partitioning space directly, and the two hierarchical partitioning schemes, BSP trees and octrees, used most often in rendering.

Solid Modeling: notes

Sweep, Boundary and Spatial-Partitioning Representation

A solid in this sense is any object with a stable shape and volume, and solid modeling is the branch of geometric modeling concerned with representing such objects completely enough that a computer can answer questions like "is this point inside the object" or "do these two objects intersect," which a bare surface description cannot always answer unambiguously. Three concepts recur across every representation scheme: a boundary point is a point whose distance to both the object and its complement (everything outside the object) is zero, that is, a point exactly on the surface; interior points are every other point that belongs to the object; and the closure of the object is the union of its interior points and its boundary points.

Sweep representations build a 3D object by moving a 2D shape (or a lower-dimensional curve or point) along a path through space; they are effective for objects that have translational, rotational or other symmetry, since sweeping captures that symmetry directly rather than requiring it to be reproduced vertex by vertex. A translational sweep moves the shape in a straight line, producing a prism-like solid (a circle swept along a line becomes a cylinder); a rotational sweep moves the shape along a circular arc through any angle up to $360°$ about an axis, producing a solid of revolution (a rectangle swept a full turn about one edge becomes a cylinder; a circle swept about a line not touching it becomes a torus). More generally, a sweep can follow any specified path curve, and the swept shape's own size or form can be varied as it travels along the path, allowing tapered or twisted solids.

Boundary representation (B-rep), covered in more depth in the previous chapter, describes a solid purely by its enclosing surfaces (polygon facets or curved patches). Spatial-partitioning representation takes the opposite approach: it describes an object as a collection of small, adjoining, non-intersecting solid cells that together fill the object's volume, using schemes such as cell decomposition, octrees or (in 2D) quadtrees. Because the cells are simple, regular shapes (usually cubes at a fixed subdivision level), a spatial-partitioning model answers "is this point inside" almost immediately, by locating which cell the point falls in, whereas a B-rep would need to test the point against every bounding surface.

What this unit covers

  • Sweep, Boundary and Spatial-Partitioning Representation
  • Binary Space Partition Trees (BSP)
  • Octree Representation

Binary Space Partition Trees

2081 · 10 marks

Explain RGB color model. Differentiate between virtual reality and augmented reality with examples. Explain Binary Space Partitioning (BSP) trees with a suitable example.[10]

Show solved answer

Answer: RGB Color Model, VR vs AR, and BSP Trees


1. RGB Color Model

The RGB (Red, Green, Blue) color model is an additive color model used in computer graphics and display systems. It is based on the principle that a wide range of colors can be produced by combining three primary colors of light: Red, Green, and Blue.

Key Principles

  • Additive Color Mixing: Colors are created by adding light. When all three primaries are combined at full intensity, white is produced. When all are absent, black is produced.
  • Each color component has an intensity value typically ranging from 0 to 255 (in 8-bit representation) or 0.0 to 1.0 (normalized).
  • The model is directly tied to how CRT monitors, LCD screens, and projectors emit light using red, green, and blue phosphors or sub-pixels.

Color Representation

A color is represented as a triplet: (R, G, B)

ColorRGB
Red25500
Green02550
Blue00255
White255255255
Black000
Yellow2552550
Cyan0255255
Magenta2550255

Advantages

  • Directly maps to hardware display technology (raster scan monitors).
  • Produces a much wider range of colors than older methods like the beam penetration method.
  • Produces realistic images.

Disadvantages

  • It is device-dependent (colors may vary across different monitors).
  • Poor resolution in some hardware implementations (as noted in shadow mask systems).
  • Difficult to align all three color beams precisely on the same hole in shadow mask CRTs.

Diagram

        Green (0,255,0)
           /    \
          /      \
  Cyan --+--Yellow
         |
  Blue --+-- Red
(0,0,255)    (255,0,0)
         \      /
          \    /
          Magenta
              |
           White (center)
           Black (origin)

2. Virtual Reality (VR) vs. Augmented Reality (AR)

Definitions

Virtual Reality (VR): Virtual Reality creates an entirely virtual world that replaces the real world. The user is fully immersed in a computer-generated environment. It is generally achieved by wearing a helmet or goggles having VR technology.

Augmented Reality (AR): Augmented Reality is the result of using technology to superimpose information such as sound, images, and text on the world we see. AR is a mix of the real world and the virtual world. It expands our physical world by adding layers of digital information on it. This is typically achieved by holding a smartphone in front of us.

Types of Augmented Reality

There are four types of AR today:

  1. Markerless AR
  2. Marker-based AR
  3. Projection-based AR
  4. Superimposition-based AR

Comparison Table

BasisVirtual Reality (VR)Augmented Reality (AR)
WorldCreates an entirely virtual worldMix of real world and virtual world
DifferentiationHard to differentiate between real and virtualUsers can clearly distinguish between both worlds
InteractionUser interacts only with the virtual worldUser interacts with both real and virtual worlds
HardwareAchieved by wearing a VR helmet or gogglesAchieved by holding a smartphone in front of us
ImmersionFully immersive experiencePartially immersive experience
Real WorldReal world is completely replacedReal world is enhanced with digital overlays

Examples

  • VR Example: A user wearing an Oculus Rift headset is placed inside a fully simulated 3D game environment where everything they see is computer-generated. Medical students can practice surgery in a fully virtual operating room.

  • AR Example: Pokemon GO is a popular AR game where virtual Pokemon characters are superimposed on the real-world camera view of a smartphone. Similarly, IKEA Place app lets users place virtual furniture in their real room using a phone camera.


3. Binary Space Partitioning (BSP) Trees

Definition

A Binary Space Partitioning (BSP) tree is a data structure used in computer graphics where a scene is recursively subdivided into two sections (FRONT and BACK) at each step using a plane that can be at any position and orientation.

From the notes: "It is a generic process of dividing a scene into two until the partitioning satisfies one or more requirements. It is a way of grouping data so it can be processed faster."

Key Characteristics

  • The cutting planes can be positioned and oriented to suit the spatial distribution of objects, making BSP trees more efficient than octrees.
  • BSP trees reduce the depth of the tree representation compared to octrees, thus reducing search time.
  • They are useful for:
    • Identifying visible surfaces
    • Space partitioning in ray-tracing algorithms
  • Many 3D modeling and rendering programs use BSP trees to make rendering faster.

Construction of a BSP Tree

The construction process (from the notes) is as follows:

  1. A space containing a 3D scene is recursively divided into two parts: FRONT and BACK with respect to the viewport, by selecting any surface as a dividing plane.
  2. The recursive subdivision is repeated until each half-space contains a manageable number of objects.
  3. The subdivision process is represented as a binary tree with the initial partitioning plane as the root node.
  4. The FRONT object is represented as the left node of the tree.
  5. The BACK object is represented as the right node of the tree.
  6. Each partitioning plane in a subspace becomes an internal node of the tree, and the recursion continues until every leaf holds a small, manageable set of surfaces.

Example

Consider a simple scene of three polygons A, B and C viewed from the position shown, where plane P1 is chosen along polygon A.

                 View position
                      |
        ----- P1 (plane of A) -----
         Front of P1      Back of P1
            B                 C

The construction proceeds as follows. Polygon A is selected as the first partitioning plane, so A becomes the root. Polygon B lies in the half space in front of P1, so it goes to the left subtree, and polygon C lies behind P1, so it goes to the right subtree. If a polygon straddles the plane, it is split along the plane and the two pieces are placed in the two subtrees.

            A  (root, plane P1)
           /   \
   front  B     C  back

To display the scene the tree is traversed back to front relative to the viewer, which for a viewer in front of P1 means the back subtree first, then the root polygon, then the front subtree, giving the drawing order C, A, B. Because nearer surfaces are painted after farther ones, hidden surfaces are removed correctly without any depth comparison per pixel, and the same tree gives a different but still correct order for any other viewing position.

Advantages and Limitations

AdvantagesLimitations
Correct visibility order for any viewpoint from a single precomputed treeThe tree must be rebuilt when the geometry moves
Shallower than an octree, so searching is fasterSplitting polygons that straddle a plane increases their number
Cutting planes can be oriented to suit the sceneThe choice of splitting plane strongly affects the tree quality

4. Conclusion

The RGB model is an additive model based on the three primaries red, green and blue arranged along the axes of a unit cube, with black at the origin, white at the opposite corner and the greys along the main diagonal, and it is the model used by every emissive display. Virtual reality and augmented reality differ in how much of the real world survives: VR replaces it with a wholly synthetic environment seen through a headset, whereas AR keeps the real scene and overlays digital content on it, as Pokemon GO and IKEA Place do on a phone. BSP trees serve a different purpose again, organising the scene itself: by recursively splitting space into front and back half spaces about chosen planes, they store a scene in a form that yields a correct back to front drawing order for any viewpoint, which is why they underlie visible surface determination and ray tracing acceleration.

Open this answer on its own page →

2080 · 5 marks

What do you understand by solid modeling? Explain binary space partition method. [5]

Solid modeling is the representation of the solid parts of an object on a computer. It is the most advanced method of geometric modeling in three dimensions. A solid is a state of matter characterized by particles arranged such that their shape and volume are relatively stable. Solid modeling pro...

Open this answer on its own page →

2079 · 5 marks

Write short notes on (any two): a. BSP Tree b. Virtual Reality c. Intensity Attenuation [5]

Show solved answer

Short Notes (Any Two)


a. BSP Tree (Binary Space Partition Tree)

A Binary Space Partition (BSP) Tree is a data structure used in computer graphics to recursively subdivide a 3D scene into two sections at each step using a cutting plane that can be at any position and orientation.

Key Points:

  • The scene is repeatedly divided into two sub-regions until the partitioning satisfies one or more requirements (e.g., each region contains a manageable number of objects).
  • It is a way of grouping spatial data so that it can be processed faster during rendering.
  • BSP trees provide more efficient partitioning compared to octrees because the cutting planes can be positioned and oriented to suit the actual spatial distribution of objects in the scene.
  • This flexibility reduces the depth of the tree, which in turn reduces the time required to search the tree.

Applications:

  • Visible surface identification (determining which surfaces are visible from a given viewpoint)
  • Ray-tracing algorithms (organizing objects in virtual space so rays can be tested against objects efficiently)
  • Used in many 3D modeling and rendering programs to make rendering faster

Advantage over Octree:

Unlike octrees (which always split along fixed axis-aligned planes), BSP trees allow arbitrary plane orientations, making them more adaptable to complex scene geometries.


c. Intensity Attenuation

Intensity Attenuation refers to the rate of decrease in light intensity with respect to the distance between a light source and an object surface. As distance increases, the light reaching the surface becomes weaker.

For a Point Light Source:

The intensity attenuation is given by the inverse square law:

$$f(d) = \frac{1}{d^2}$$

where d is the distance between the point light source and the object.

For a Distributed Light Source:

A more general attenuation function is used to avoid singularities (division by zero when d is very small) and to give artists more control:

$$f(d) = \frac{1}{a_0 + a_1 d + a_2 d^2}$$

where:

  • a₀ = constant attenuation coefficient (surface parameter)
  • a₁ = linear attenuation coefficient (surface parameter)
  • a₂ = quadratic attenuation coefficient (surface parameter)
  • d = distance between the object and the distributed light source

Significance:

  • Intensity attenuation is an important factor in realistic illumination models.
  • It ensures that objects farther from the light source appear darker, simulating real-world lighting behavior.
  • The three coefficients (a₀, a₁, a₂) can be adjusted to control how quickly the light fades with distance, giving flexibility in rendering different lighting environments.
Open this answer on its own page →

2078 · 10 marks

What is the method to recognize boundary point and interior point in solid modeling? Describe how BSP recursively subdivided a space into convex sets.[10]

--- Solid modeling is the representation of solid parts of an object on a computer. It is the most advanced method of geometric modeling in three dimensions. It provides a complete geometric data representation of an object that enables points in space to be classified relative to the object -- w...

Open this answer on its own page →

2077 · 5 marks

Describe how a polygon can be represented using BSP tree with example. [5]

A Binary Space Partitioning (BSP) tree is a data structure used to recursively subdivide a space (containing 2D polygons or 3D scenes) into two half-spaces -- FRONT and BACK -- with respect to a selected dividing plane (or line in 2D). The result is represented as a binary tree where: - The root ...

Open this answer on its own page →

Sweep, Boundary and Spatial-Partitioning Representation

2081 · 5 marks

Write short notes on: a) Sweep Representation b) Intensity Attenuation [5]

--- Sweep Representation is a technique used to construct 3D objects from 2D shapes that possess some kind of symmetry (translational, rotational, or other symmetries). Translational Sweep (Linear Extrusion): - A 2D shape (cross-section) is moved (swept) along a straight path or axis. - Example: ...

Open this answer on its own page →

2075 · 10 marks

Describe the architecture of raster scan display. Explain about sweep, octree and boundary representations for solid modeling.[10]

--- In a raster scan system, the electron beam is swept across the screen one row at a time, from top to bottom. As the beam moves across each row, its intensity is turned on and off to create a pattern of illuminated spots. The picture definition is stored in a memory area called the Refresh Buf...

Open this answer on its own page →