5 3d Objects Representation

Computer Graphics · Unit 5 · 7 hrs

3D Objects Representation

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

3D Objects Representation in short

A 3D graphics system needs a way to store the shape of an object inside the computer before it can transform, project or shade it. This chapter surveys the main representation schemes, from flat polygon boundaries to smooth parametric curves and simple quadric solids.

3D Objects Representation: notes

Representing Surfaces: Boundary and Space partitioning

Solid-object representation schemes fall into two broad families. Boundary representations (B-reps) describe a 3D object by the set of surfaces that separate its interior from the surrounding space, typically polygon facets or curved spline patches; because only the boundary is stored, B-reps are compact and are what most rendering pipelines consume directly. Space-partitioning representations instead describe an object by its interior, dividing the region of space the object occupies into a set of small, non-overlapping, contiguous solid cells; the octree is the standard space-partitioning scheme, recursively subdividing a cube into eight octants until each octant is either entirely inside, entirely outside, or (below a resolution limit) treated as a boundary cell. The two schemes trade off in the same way B-reps and space-partitioning solids do everywhere in computing: boundary representations are compact and fast to render but slow to query for interior properties (is this point inside the solid), while space-partitioning representations answer interior queries directly but use far more memory for the same surface detail.

Polygon Surface: Polygon tables, Surface normal and Spatial orientation of surfaces, Plane equations, Polygon meshes

The most common boundary representation is a set of surface polygons enclosing the object's interior, since polygons simplify and speed up rendering compared to curved surfaces. A polygon table stores this data in three linked lists: a vertex table holding the coordinate values of every vertex; an edge table holding, for each edge, pointers back into the vertex table identifying its two endpoints; and a polygon table holding, for each face, pointers back into the edge table identifying the edges that bound it. Separately, an attribute table records non-geometric properties such as surface colour, transparency and reflectivity for each polygon.

Plane equations. Every planar polygon face lies in a plane satisfying $$ Ax + By + Cz + D = 0. $$

Given three non-collinear vertices $P_1, P_2, P_3$ of the polygon, the coefficients $(A,B,C)$ are the components of the surface normal vector $\mathbf{N} = (P_2 - P_1) \times (P_3 - P_1)$, and $D = -\mathbf{N}\cdot P_1$.

Worked example. For the triangle with vertices $P_1(0,0,0)$, $P_2(4,0,0)$, $P_3(0,3,0)$: $P_2-P_1 = (4,0,0)$, $P_3-P_1=(0,3,0)$, and their cross product is $$ \mathbf{N} = (4,0,0)\times(0,3,0) = (0\cdot0-0\cdot3,\ 0\cdot0-4\cdot0,\ 4\cdot3-0\cdot0) = (0,0,12), $$

so $D = -(0,0,12)\cdot(0,0,0) = 0$ and the plane equation is $12z = 0$, i.e. $z=0$, correctly identifying that the whole triangle lies in the $xy$-plane.

Spatial orientation and the inside-outside test. The plane equation also decides which side of a face a point lies on: substituting a point $(x,y,z)$ into $Ax+By+Cz+D$ gives a positive value on the side the normal points toward and a negative value on the opposite side, which is exactly how back-face detection (covered later, in visible-surface detection) decides whether a polygon faces the viewer.

Polygon meshes. Curved or faceted surfaces made of many small flat polygons stitched edge to edge are called polygon meshes. A common and storage-efficient special case is the triangle strip, in which each new triangle after the first two shares an edge with the previous triangle, so only one new vertex needs to be specified per additional triangle instead of three.

What this unit covers

  • Representing Surfaces: Boundary and Space partitioning
  • Polygon Surface: Polygon tables, Surface normal and Spatial orientation of surfaces, Plane equations, Polygon meshes
  • Wireframe Representation
  • Blobby Objects
  • Representing Curves: Parametric Cubic Curves, Spline Representation, Cubic spline interpolation, Hermite Curves, Bezier and B-spline Curve and surface
  • Quadric Surface: Sphere and Ellipsoid

Representing Curves

2081 · 5 marks

Construct the Bezier curve with the following polygon vertices (control points): A(1,1), B(2,3), C(4,3), and D(6,4). [5]

Show solved answer

Bezier Curve Construction

Given

Control points (4 points → cubic Bezier, degree $n = 3$):

  • $P_0 = A(1, 1)$
  • $P_1 = B(2, 3)$
  • $P_2 = C(4, 3)$
  • $P_3 = D(6, 4)$

Solution

Bezier / Bernstein Blending Functions

$$P(u) = \sum_{k=0}^{3} P_k , BEZ_{k,3}(u), \quad 0 \le u \le 1$$

$$BEZ_{k,3}(u) = \binom{3}{k} u^k (1-u)^{3-k}$$

$k$Blending Function
0$(1-u)^3$
1$3u(1-u)^2$
2$3u^2(1-u)$
3$u^3$

Parametric Equations

$$x(u) = 1(1-u)^3 + 6u(1-u)^2 + 12u^2(1-u) + 6u^3$$ $$y(u) = 1(1-u)^3 + 9u(1-u)^2 + 9u^2(1-u) + 4u^3$$

Point Computations

u = 0: $x = 1,; y = 1$

u = 0.2: $(1-u)=0.8$ $$x = 0.512 + 6(0.2)(0.64) + 12(0.04)(0.8) + 6(0.008)$$ $$= 0.512 + 0.768 + 0.384 + 0.048 = 1.712$$ $$y = 0.512 + 9(0.2)(0.64) + 9(0.04)(0.8) + 4(0.008)$$ $$= 0.512 + 1.152 + 0.288 + 0.032 = 1.984$$

u = 0.4: $(1-u)=0.6$ $$x = 0.216 + 6(0.4)(0.36) + 12(0.16)(0.6) + 6(0.064)$$ $$= 0.216 + 0.864 + 1.152 + 0.384 = 2.616$$ $$y = 0.216 + 9(0.4)(0.36) + 9(0.16)(0.6) + 4(0.064)$$ $$= 0.216 + 1.296 + 0.864 + 0.256 = 2.632$$

u = 0.5: $(1-u)=0.5$ (midpoint, useful check) $$x = 0.125 + 6(0.5)(0.25) + 12(0.25)(0.5) + 6(0.125)$$ $$= 0.125 + 0.75 + 1.5 + 0.75 = 3.125$$ $$y = 0.125 + 9(0.5)(0.25) + 9(0.25)(0.5) + 4(0.125)$$ $$= 0.125 + 1.125 + 1.125 + 0.5 = 2.875$$

u = 0.6: $(1-u)=0.4$ $$x = 0.064 + 6(0.6)(0.16) + 12(0.36)(0.4) + 6(0.216)$$ $$= 0.064 + 0.576 + 1.728 + 1.296 = 3.664$$ $$y = 0.064 + 9(0.6)(0.16) + 9(0.36)(0.4) + 4(0.216)$$ $$= 0.064 + 0.864 + 1.296 + 0.864 = 3.088$$

u = 0.8: $(1-u)=0.2$ $$x = 0.008 + 6(0.8)(0.04) + 12(0.64)(0.2) + 6(0.512)$$ $$= 0.008 + 0.192 + 1.536 + 3.072 = 4.808$$ $$y = 0.008 + 9(0.8)(0.04) + 9(0.64)(0.2) + 4(0.512)$$ $$= 0.008 + 0.288 + 1.152 + 2.048 = 3.496$$

u = 1.0: $x = 6,; y = 4$

Summary Table

$u$$x(u)$$y(u)$
0.01.0001.000
0.21.7121.984
0.42.6162.632
0.53.1252.875
0.63.6643.088
0.84.8083.496
1.06.0004.000

The curve starts at $A(1,1)$, ends at $D(6,4)$, and remains within the convex hull of the control polygon, tangent to $AB$ at the start and to $CD$ at the end.

Open this answer on its own page →

2079 · 5 marks

Explain about parametric curve. Describe the properties of Bezier curve. [5]

--- A curve is an infinitely large set of points. Curves are broadly classified into three categories: explicit, implicit, and parametric curves. Curves having parametric form are called parametric curves. A two-dimensional parametric curve has the following form: $$P(t) = [f(t),\ g(t)] \quad \te...

Open this answer on its own page →

2078 · 5 marks

Discuss the strength and weakness of the human visual system. Describe Spline representation for the curve. [5]

--- (Standard CS/Graphics knowledge, Do not cover this topic directly.) Strength ------------- 1 Wide dynamic range: The human eye can adapt to a very large range of light intensities, from bright sunlight to dim moonlight. 2 Color perception: The eye can distinguish millions of colors using thre...

Open this answer on its own page →

2078 · 5 marks

Define fractal. Explain the Bezier curve and B-Spline curve. [5]

Show solved answer

Fractal, Bezier Curve, and B-Spline Curve


1. Fractal (Definition)

A fractal is a geometric figure or natural phenomenon that exhibits self-similarity at every scale of magnification. This means a fractal looks similar (or identical) when zoomed in or out at any level. Fractals are used in computer graphics to model complex natural shapes such as mountains, clouds, coastlines, and trees that cannot be easily described by classical Euclidean geometry.

Key properties of fractals:

  • Self-similarity: Each part resembles the whole.
  • Fractional dimension: They have non-integer (fractional) dimensions.
  • Infinite detail: They show complexity at every level of magnification.

Example: Koch Snowflake, Sierpinski Triangle, Mandelbrot Set.


2. Bezier Curve

As noted in the reference, the Bezier spline was developed by French engineer Pierre Bezier and is widely used in CAD systems for curve and surface design.

Definition

A Bezier curve is a parametric curve defined using a set of control points. It does not necessarily pass through all control points (except the first and last); instead, it approximates the shape defined by those points.

Blending Functions (Bernstein Polynomials)

For n+1 control points P0, P1, ..., Pn, the Bezier curve is defined as:

$$Q(t) = \sum_{k=0}^{n} P_k \cdot B_{k,n}(t), \quad 0 \leq t \leq 1$$

Where the blending functions (Bernstein basis polynomials) are:

$$B_{k,n}(t) = \binom{n}{k} t^k (1-t)^{n-k}$$

Properties of Bezier Curves

  • The curve passes through the first and last control points.
  • The curve lies within the convex hull of the control points.
  • The degree of the curve is n for n+1 control points.
  • Changing any one control point affects the entire curve (global control).
  • Easy to implement and widely available in CAD systems.

3. B-Spline Curve

As stated in the reference, B-Splines are the most widely used class of approximating splines.

Definition

A B-Spline (Basis Spline) curve is a piecewise polynomial curve defined by a set of control points and a knot vector. It generalizes the Bezier curve and provides greater flexibility.

$$Q(t) = \sum_{k=0}^{n} P_k \cdot N_{k,d}(t)$$

Where:

  • P_k = control points
  • N_{k,d}(t) = B-Spline basis functions of degree d
  • The basis functions are defined recursively using the Cox-de Boor recursion formula.

Advantages over Bezier Curves

FeatureBezierB-Spline
Degree vs control pointsDegree depends on number of control pointsDegree can be set independently of control points
ControlGlobal controlLocal control over curve shape
ComplexitySimplerMore complex

Properties of B-Spline Curves

  • Provides local control: modifying one control point affects only a portion of the curve.
  • The degree of the curve can be chosen independently of the number of control points.
  • The curve lies within the convex hull of the control points.
  • More flexible for modeling complex shapes.
  • Disadvantage: More complex to implement than Bezier splines.

Summary Table

FeatureFractalBezier CurveB-Spline Curve
NatureSelf-similar geometric figureParametric approximation curvePiecewise polynomial curve
ControlN/AGlobal (all control points)Local (individual control points)
DegreeFractional dimensionDepends on control pointsIndependent of control points
UseNatural shapes, terrainCAD, font designCAD, surface modeling
Open this answer on its own page →

2075 · 5 marks

Mention any two color command in OpenGL. Explain about Hermite curve. [5]

--- OpenGL provides color commands primarily in RGBA mode, where colors are specified using Red, Green, Blue, and optionally Alpha (transparency) components mapped onto the range (0.0, 1.0). This command specifies a color using three floating-point values for the red, green, and blue components. ...

Open this answer on its own page →

Polygon Surface

2080 · 5 marks

Explain polygon surface representation using Polygon table and polygon meshes. [5]

The most commonly used boundary representation for a 3D graphics object is a set of surface polygons that enclose the interior of the object. Many graphics systems store all object descriptions as a set of surface polygons because this simplifies and speeds up surface rendering and display. --- A...

Open this answer on its own page →

2079 · 5 marks

What is polygon table? Explain the use of this method in 3D object representation. [5]

A polygon table is a data structure used to store and organize all the geometric and attribute information about the surface polygons that make up a 3D object. Since the most commonly used boundary representation (B-rep) for a 3D graphics object is a set of surface polygons that enclose the objec...

Open this answer on its own page →

2078 · 5 marks

What is the task of a polygon table? Why do we have to remove hidden surfaces? Explain with any one methodology. [5]

--- A polygon table is the specification of polygon surfaces using vertex coordinates and other attributes. It organizes the geometric and qualitative data needed to describe a 3D object. Polygon tables are organized into two groups: Three lists are maintained: Table Purpose ------ Vertex Table S...

Open this answer on its own page →

2077 · 10 marks

How polygon table is used in representing polygons? Explain the representations of any three curves.[10]

Show solved answer

Polygon Table in Representing Polygons and Curve Representations


Part 1: Polygon Table for Representing Polygons

Polygon Surfaces

The most commonly used boundary representation (B-rep) for a 3D graphics object is a set of surface polygons that enclose the interior of the object. Many graphics systems store all object descriptions as a set of surface polygons because it simplifies and speeds up surface rendering and display.

Polygon Tables

A polygon table is the specification of polygon surfaces using vertex coordinates and other attributes. Polygon data tables are organized into two groups:

  1. Geometric Tables
  2. Attribute Tables

Geometric Tables

For storing geometric data, three lists are created:

1. Vertex Table

  • Stores the coordinate values (x, y, z) for each vertex in the object.
  • Example:
Vertexxyz
V1x1y1z1
V2x2y2z2
V3x3y3z3
............

2. Edge Table

  • Contains pointers back into the vertex table to identify the two vertices for each polygon edge.
  • Example:
EdgeVertex Pointers
E1V1, V2
E2V2, V3
E3V3, V1
......

3. Polygon Table

  • Contains pointers back into the edge table to identify the edges that form each polygon.
  • Example:
PolygonEdge Pointers
P1E1, E2, E3
P2E3, E4, E5
......

Attribute Table

  • Contains qualitative properties of each polygon surface such as:
    • Degree of transparency
    • Surface reflectivity
    • Color and texture information

Diagram of Polygon Table Structure

Vertex Table        Edge Table          Polygon Table
-----------         ----------          -------------
V1: (x1,y1,z1) <-- E1: V1,V2  <------ P1: E1,E2,E3
V2: (x2,y2,z2) <-- E2: V2,V3          P2: E3,E4,E5
V3: (x3,y3,z3) <-- E3: V3,V1

This hierarchical pointer structure allows efficient storage and retrieval of polygon geometry for rendering.


Part 2: Representations of Three Curves


1. Spline Curves

Definition: A spline refers to a flexible strip used to produce a smooth curve through a designated set of points. Mathematically, a spline curve is described using a piecewise cubic polynomial function.

Key Concepts:

  • Several small weights are distributed along the length of the strip to hold it in position on a drafting table as the curve is drawn.
  • The curve passes through or near a set of control points.
  • A spline surface can be described with two sets of orthogonal spline curves.

Mathematical Representation: A piecewise cubic polynomial for a segment between two control points is:

P(t) = a*t³ + b*t² + c*t + d,   0 ≤ t ≤ 1

where a, b, c, d are coefficient vectors determined by boundary conditions.

Applications:

  • Designing curve and surface shapes in graphics applications.
  • Used in CAD/CAM, animation, and font design.

Diagram:

Control Points: P0, P1, P2, P3
         P1 *       * P2
           /         \
     P0 *               * P3
         \_____________/
           Spline Curve

2. Bezier Curves

Definition: A Bezier curve is a parametric curve defined by a set of control points. The curve is influenced by all control points but generally does not pass through the intermediate ones (only through the first and last).

Mathematical Representation: For n+1 control points P0, P1, ..., Pn, the Bezier curve is:

P(t) = Σ [C(n,k) * t^k * (1-t)^(n-k) * Pk],   0 ≤ t ≤ 1
       k=0 to n

where C(n,k) = n! / (k! * (n-k)!) are the Bernstein basis polynomials.

For a cubic Bezier curve (n=3):

P(t) = (1-t)³P0 + 3t(1-t)²P1 + 3t²(1-t)P2 + t³P3

Properties:

  • The curve always passes through P0 and P3 (endpoints).
  • The curve lies within the convex hull of the control points.
  • Changing one control point affects the entire curve.

Diagram:

    P1 *----* P2
      /        \
P0 *            * P3
    \__Bezier__/

3. B-Spline Curves

Definition: A B-Spline (Basis Spline) curve is an extension of the Bezier curve that provides local control over the shape of the curve. Changing one control point affects only a portion of the curve.

Mathematical Representation:

P(t) = Σ Pi * Ni,k(t)
       i=0 to n

where:

  • Pi are the control points
  • Ni,k(t) are the B-Spline basis functions of order k
  • The basis functions are defined recursively:
Ni,1(t) = 1,  if ti ≤ t < ti+1,   else 0

Ni,k(t) = [(t - ti) / (ti+k-1 - ti)] * Ni,k-1(t) + [(ti+k - t) / (ti+k - ti+1)] * Ni+1,k-1(t)

where $t_0, t_1, \ldots, t_{n+k}$ is the sequence of knot values that determines where and how the control points influence the curve.

Properties:

  • Provides local control: moving one control point only changes the curve over a limited parameter range (roughly $k$ segments), unlike a Bezier curve where every control point affects the entire curve.
  • The degree of the curve (order $k$) is independent of the number of control points, unlike a Bezier curve where the degree is always one less than the number of control points.
  • Includes Bezier curves as a special case (a B-Spline with a single knot span and no interior knots reduces to a Bezier curve).
  • Widely used in CAD systems and font outlines where localized editing of a complex curve is needed.

Diagram:

     P1 *        * P3
       /  \    /  \
 P0 *      \  /      * P4
      \_____\/______/
   (each control point only reshapes a local segment)

Summary

Together, the polygon table (vertex, edge, polygon and attribute lists) gives an efficient boundary representation for flat-faced 3D objects, while spline, Bezier, and B-Spline curves give three progressively more flexible ways to represent smooth curved surfaces: splines interpolate through control points with piecewise cubics, Bezier curves give a single polynomial influenced by every control point globally, and B-Splines add local control through their knot-based recursive basis functions, which is why B-Splines are preferred whenever a designer needs to edit part of a complex curve without disturbing the rest of it.

Open this answer on its own page →

Blobby Objects

2079 · 5 marks

What are blobby objects? How it is represented? Explain the wireframe representation of 3D objects. [5]

--- Definition: Objects that do not maintain a fixed shape but change their surface characteristics in certain motions are known as blobby objects. Examples: - Molecular structures - Water droplets - Melting objects - Soft organic shapes (muscles, clouds) These objects have surfaces that deform a...

Open this answer on its own page →

2077 · 5 marks

Define blobby objects. Describe about basic illumination models. [5]

--- Blobby objects are objects that do not maintain a fixed shape but change their surface characteristics during certain motions or interactions. Examples: - Molecular structures - Water droplets - Melting objects - Muscle tissue deformation Several models have been developed to represent blobby...

Open this answer on its own page →

Quadric Surface

2078 · 5 marks

What is quadric surface? Compare between diffuse reflection and specular reflection. [5]

--- A quadric surface is a frequently used class of 3D objects described by second-degree (quadratic) equations. These surfaces are defined mathematically using polynomials of degree two in x, y, and z. Common examples of quadric surfaces include: - Spheres - Ellipsoids - Tori - Paraboloids - Hyp...

Open this answer on its own page →

Wireframe Representation

2075 · 5 marks

What is the purpose of wireframe representation? Describe about boundary and space partitioning. [5]

A wireframe model represents a 3D object by describing only its edges and vertices (corners). It is the simplest form of 3D object representation. Purposes: - To provide a quick and simple visual outline of a 3D object using only its edges and corner points. - To allow fast rendering since no sur...

Open this answer on its own page →