[go: nahoru, domu]

Geometric primitive: Difference between revisions

Content deleted Content added
m typo
m period after sentence
 
(8 intermediate revisions by 6 users not shown)
Line 1:
{{Short description|basicBasic shapes represented in vector graphics}}
[[File:beetle.svg|thumb|340px|[[Vector graphics]] consists of geometrical primitives.]]
 
In [[Vector graphics|vector]] [[computer graphics]], [[Computer-aided design|CAD systems]], and [[geographic information systems]], '''geometric primitive''' (or '''prim''') is the simplest (i.e. 'atomic' or irreducible) [[geometric shape]] that the system can handle (draw, store). Sometimes the [[subroutine]]s that draw the corresponding objects are called "geometric primitives" as well. The most "primitive" primitives are [[point (geometry)|point]] and straight [[line segment]], which were all that early [[vector graphics]] systems had.
 
In [[constructive solid geometry]], primitives are simple [[geometry|geometric]] shapes such as a [[Cube (geometry)|cube]], [[cylinder (geometry)|cylinder]], [[sphere]], [[cone (geometry)|cone]], [[Pyramid (geometry)|pyramid]], [[torus]].
 
Modern [[2D computer graphics]] systems may operate with primitives which are lines[[Curve|curves]] (segments of straight lines, circles[[circle]]s and more complicated curves), as well as shapes (boxes, arbitrary polygons, circles).
 
A common set of two-dimensional primitives includes lines, points, and [[polygon]]s, although some people prefer to consider triangles[[triangle]]s 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 (such as [[Bézier curve]]s, [[circle]]s, etc.) may be considered primitives; in other cases, curves are complex forms created from many straight, primitive shapes.
 
== Common primitives ==
The set of geometric primitives is based on the ''[[Dimensiondimension]]'' of the shaperegion being represented:<ref name="Peuquet">Peuquet, Donna J. (1984), [https://www.researchgate.net/publication/244954245_A_Conceptual_Framework_and_Comparison_of_Spatial_Data_Models A Conceptual Framework and Comparison of Spatial Data Models], ''Cartographica'' 21 (4): 66–113. doi:10.3138/D794-N214-221R-23R5.</ref>
* '''[[Point (geometry)|Point]]''' (0-dimensional), a single location with no height, width, or depth.
* '''[[Line (geometry)|Line]]''' or '''[[Curvecurve]]''' (1-dimensional), having length but no width, although a linear feature may curve through a higher-dimensional space.
* '''[[Planar Regionsurface]]'' or ''[[Surface|curved surface]]'' (2-dimensional), having length and width.
* '''Volumetric Regionregion'' or ''[[Solid figure|solid]]'' (3-dimensional), having length, width, and depth.
 
* In GIS, the [[terrain]] surface 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 scalar [[Field (geography)|field]] property 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 software [[Interpolation|interpolating]] the remainder of the shape at the time of analysis or display, using the algorithms of [[Computational geometry]].<ref>[https://saylordotorg.github.io/text_essentials-of-geographic-information-systems/s08-02-vector-data-models.html Vector Data Models], ''Essentials of Geographic Information Systems'', Saylor Academy, 2012</ref>
* A '''Point''' is a single coordinate in a [[Cartesian coordinate system]]. Some data models allow for '''Multipoint''' features consisting of several disconnected points.
Line 48 ⟶ 50:
*[[2D geometric model]]
*[[Sculpted prim]]
*[[Simplex]]
*[[Triton (programming language)]]
 
==References==