Skip to main content

Model cone or cylinder surfaces

Short answer

A cylinder is modeled by dividing top and bottom circles into n points, forming n side quadrilaterals and two n-gon caps. A cone uses n base points and one apex to form n side triangles and an n-gon base. Polygon tables store the vertices, edges (circular and vertical), and surfaces; increasing n gives a smoother approximation.

How can we model cone or cylindrical like surfaces using boundary representation technique?

In boundary representation (B-rep), a curved solid is modelled by its bounding surface, which is approximated by a polygon mesh; the vertices, edges and faces are stored in polygon tables.

Cylinder

Take the circle of radius r at the bottom (z = 0) and at the top (z = h), and divide each into n equal arcs (n = 8, say). Bottom vertices: (r cos θk, r sin θk, 0); top vertices: (r cos θk, r sin θk, h), with θk = 360°·k/n.

  • The side is made of n rectangles (quadrilaterals), each using two adjacent bottom vertices and the two top vertices above them.
  • The top and bottom are n-sided polygons (or n triangles from a centre point).
 top    V9--V10--V11 ...
        |    |    |
 bottom V1--V2---V3  ...

Tables: 2n vertices; 3n edges (n bottom, n top, n vertical); n + 2 faces.

Cone

The circular base is divided into n points, and one extra vertex is the apex (0, 0, h).

  • The side is made of n triangles, each joining the apex to two adjacent base vertices.
  • The base is an n-sided polygon.

Tables: n + 1 vertices; 2n edges; n + 1 faces.

Cone vertex table: V0 apex (0,0,h); V1..Vn base points
Edge table: E1..En base edges (Vk Vk+1); En+1..E2n apex edges (V0 Vk)
Surface table: S_k = apex edge, base edge, apex edge (k = 1..n); S_base = E1..En

A larger n gives a smoother approximation, and the flat look can be hidden by Gouraud or Phong shading. Alternatively, the curved side can be defined by a parametric surface patch.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Graphics chapter 6 questions →