Geometric primitive


The term geometric primitive, or prim, in computer graphics and CAD systems is used in various senses, with the common meaning of the simplest geometric objects that the system can handle. Sometimes the subroutines that draw the corresponding objects are called "geometric primitives" as well. The most "primitive" primitives are point and straight line segment, which were all that early vector graphics systems had.
In constructive solid geometry, primitives are simple geometric shapes such as a cube, cylinder, sphere, cone, pyramid, torus.
Modern 2D computer graphics systems may operate with primitives which are lines, as well as shapes.
A common set of two-dimensional primitives includes lines, points, and polygons, although some people prefer to consider triangles primitives, because every polygon can be constructed from triangles. All other graphic elements are built up from these primitives. In three dimensions, triangles or polygons positioned in three-dimensional space can be used as primitives to model more complex 3D forms. In some cases, curves may be considered primitives; in other cases, curves are complex forms created from many straight, primitive shapes.

Common primitives

In 3D applications, basic geometric shapes and forms are considered to be primitives rather than the above list. Such shapes and forms include:
These are considered to be primitives in 3D modelling because they are the building blocks for many other shapes and forms. A 3D package may also include a list of extended primitives which are more complex shapes that come with the package. For example, a teapot is listed as a primitive in 3D Studio Max.

In 3D modelling

In CAD software or 3D modelling, the interface may present the user with the ability to create primitives which may be further modified by edits. For example in the practice of box modelling the user will start with a cuboid, then use extrusion and other operations to create the model. In this use the primitive is just a convenient starting point, rather than the fundamental unit of modelling.

In graphics hardware

Various graphics accelerators exist with hardware acceleration for rendering specific primitives such as lines or triangles, frequently with texture mapping and shaders. Modern 3D accelerators typically accept sequences of triangles as triangle strips.