Invectorcomputer graphics,CAD systems,andgeographic information systems,geometric primitive(orprim) is the simplest (i.e. 'atomic' or irreducible)geometric shapethat the system can handle (draw, store). Sometimes thesubroutinesthat draw the corresponding objects are called "geometric primitives" as well. The most "primitive" primitives arepointand straightline segment,which were all that early vector graphics systems had.

Vector graphicsconsists of geometrical primitives.

Inconstructive solid geometry,primitives are simplegeometricshapes such as acube,cylinder,sphere,cone,pyramid,torus.

Modern2D computer graphicssystems may operate with primitives which arecurves(segments of straight lines,circlesand more complicated curves), as well as shapes (boxes, arbitrary polygons, circles).

A common set of two-dimensional primitives includes lines, points, andpolygons,although some people prefer to considertrianglesprimitives, 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 (such asBézier curves,circles,etc.) may be considered primitives; in other cases, curves are complex forms created from many straight, primitive shapes.

Common primitives

edit

The set of geometric primitives is based on thedimensionof the region being represented:[1]

  • Point(0-dimensional), a single location with no height, width, or depth.
  • Lineorcurve(1-dimensional), having length but no width, although a linear feature may curve through a higher-dimensional space.
  • Planar surfaceorcurved surface(2-dimensional), having length and width.
  • Volumetric regionorsolid(3-dimensional), having length, width, and depth.

In GIS, theterrainsurface is often spoken of colloquially as "2 1/2 dimensional," because only the upper surface needs to be represented. Thus, elevation can be conceptualized as a scalarfieldproperty or function of two-dimensional space, affording it a number of data modeling efficiencies over true 3-dimensional objects. A shape of any of these dimensions greater than zero consists of an infinite number of distinct points. Because digital systems are finite, only a sample set of the points in a shape can be stored. Thus, vector data structures typically represent geometric primitives using a strategic sample, organized in structures that facilitate the softwareinterpolatingthe remainder of the shape at the time of analysis or display, using the algorithms ofComputational geometry.[2]

  • APointis a single coordinate in aCartesian coordinate system.Some data models allow forMultipointfeatures consisting of several disconnected points.
A simple polyline
  • APolygonal chainorPolylineis an ordered list of points (termedverticesin this context). The software is expected tointerpolatethe intervening shape of the line between adjacent points in the list as a parametric curve, most commonly a straight line, but other types of curves are frequently available, includingcircular arcs,cubic splines,andBézier curves.Some of these curves require additional points to be defined that are not on the line itself, but are used for parametric control.
  • APolygonis a polyline that closes at its endpoints, representing the boundary of a two-dimensional region. The software is expected to use this boundary to partition 2-dimensional space into an interior and exterior. Some data models allow for a single feature to consist of multiple polylines, which could collectively connect to form a single closed boundary, could represent a set of disjoint regions (e.g., the state ofHawaii), or could represent a region with holes (e.g., a lake with an island).
A 3Dtorusprim created inSecond Life,an example of a parametric shape
  • AParametric shapeis a standardized two-dimensional or three-dimensional shape defined by a minimal set of parameters, such as anellipsedefined by two points at its foci, or three points at its center, vertex, and co-vertex.
  • APolyhedronorPolygon meshis a set of polygon faces in three-dimensional space that are connected at their edges to completely enclose a volumetric region. In some applications, closure may not be required or may be implied, such as modeling terrain. The software is expected to use this surface to partition 3-dimensional space into an interior and exterior. Atriangle meshis a subtype of polyhedron in which all faces must be triangles, the only polygon that will always be planar, including theTriangulated irregular network(TIN) commonly used in GIS.
A NURBS surface
  • Aparametric meshrepresents a three-dimensional surface by a connected set of parametric functions, similar to a spline or Bézier curve in two dimensions. The most common structure is theNon-uniform rational B-spline(NURBS), supported by most CAD and animation software.

Application in GIS

edit

A wide variety of vector data structures and formats have been developed during the history ofGeographic information systems,but they share a fundamental basis of storing a core set of geometric primitives to represent the location and extent of geographic phenomena. Locations of points are almost always measured within a standard Earth-based coordinate system, whether the sphericalGeographic coordinate system(latitude/longitude), or a planar coordinate system, such as theUniversal Transverse Mercator.They also share the need to store a set of attributes of each geographic feature alongside its shape; traditionally, this has been accomplished using the data models, data formats, and even software ofrelational databases.

Early vector formats, such asPOLYVRT,the ARC/INFO Coverage, and theEsri shapefilesupport a basic set of geometric primitives: points, polylines, and polygons, only in two dimensional space and the latter two with only straight line interpolation. TIN data structures for representing terrain surfaces as triangle meshes were also added. Since the mid 1990s, new formats have been developed that extend the range of available primitives, generally standardized by theOpen Geospatial Consortium'sSimple Featuresspecification.[3]Common geometric primitive extensions include: three-dimensional coordinates for points, lines, and polygons; a fourth "dimension" to represent a measured attribute or time; curved segments in lines and polygons; text annotation as a form of geometry; and polygon meshes for three-dimensional objects.

Frequently, a representation of the shape of a real-world phenomenon may have a different (usually lower) dimension than the phenomenon being represented. For example, a city (a two-dimensional region) may be represented as a point, or a road (a three-dimensional volume of material) may be represented as a line. This dimensional generalization correlates with tendencies in spatial cognition. For example, asking the distance between two cities presumes a conceptual model of the cities as points, while giving directions involving travel "up," "down," or "along" a road imply a one-dimensional conceptual model. This is frequently done for purposes of data efficiency, visual simplicity, or cognitive efficiency, and is acceptable if the distinction between the representation and the represented is understood, but can cause confusion if information users assume that the digital shape is a perfect representation of reality (i.e., believing that roads really are lines).

In 3D modelling

edit

In CAD software or3D modelling,the interface may present the user with the ability to create primitives which may be further modified by edits.[4]For example, in the practice ofbox modellingthe 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.

A 3D package may also include a list of extended primitives which are more complex shapes that come with the package. For example, ateapotis listed as a primitive in3D Studio Max.

In graphics hardware

edit

Variousgraphics acceleratorsexist withhardware accelerationfor rendering specific primitives such as lines or triangles, frequently withtexture mappingandshaders.Modern 3D accelerators typically accept sequences of triangles astriangle strips.

See also

edit

References

edit
  1. ^Peuquet, Donna J. (1984),A Conceptual Framework and Comparison of Spatial Data Models,Cartographica21 (4): 66–113. doi:10.3138/D794-N214-221R-23R5.
  2. ^Vector Data Models,Essentials of Geographic Information Systems,Saylor Academy, 2012
  3. ^Open Geospatial Consortium,OpenGIS Implementation Specification for Geographic information - Simple feature access,Version 1.2.1
  4. ^"3d studio primitives".
edit