text stringlengths 0 473k |
|---|
[SOURCE: https://en.wikipedia.org/w/index.php?title=Texture_mapping&action=history] | [TOKENS: 67] |
Texture mapping: Revision history For any version listed below, click on its date to view it. For more help, see Help:Page history and Help:Edit summary. (cur) = difference from current version, (prev) = difference from preceding version, m = minor edit, → = section edit, ← = automatic edit summary |
======================================== |
[SOURCE: https://en.wikipedia.org/wiki/Polygon_mesh] | [TOKENS: 2300] |
Contents Polygon mesh In 3D computer graphics and solid modeling, a polygon mesh is a collection of vertices, edges and faces that defines the shape of a polyhedral object's surface. It simplifies rendering, as in a wire-frame model. The faces usually consist of triangles (triangle mesh), quadrilaterals (quads), or other simple convex polygons (n-gons). A polygonal mesh may also be more generally composed of concave polygons, or even polygons with holes. The study of polygon meshes is a large sub-field of computer graphics (specifically 3D computer graphics) and geometric modeling. Different representations of polygon meshes are used for different applications and goals. The variety of operations performed on meshes includes Boolean logic (Constructive solid geometry), smoothing, and simplification. Algorithms also exist for ray tracing, collision detection, and rigid-body dynamics with polygon meshes. If the mesh's edges are rendered instead of the faces, then the model becomes a wireframe model. Several methods exist for mesh generation, including the marching cubes algorithm. Volumetric meshes are distinct from polygon meshes in that they explicitly represent both the surface and interior region of a structure, while polygon meshes only explicitly represent the surface (the volume is implicit). Elements Objects created with polygon meshes must store different types of elements. These include vertices, edges, faces, polygons and surfaces. In many applications, only vertices, edges and either faces or polygons are stored. A renderer may support only 3-sided faces, so polygons must be constructed of many of these, as shown above. However, many renderers either support quads and higher-sided polygons, or are able to convert polygons to triangles on the fly, making it unnecessary to store a mesh in a triangulated form. A vertex (plural vertices) in computer graphics is a data structure that describes at least the position of a point in 2D or 3D space on a surface. The vertices of triangles often are associated not only with spatial position but also with attributes, other values used to render the object correctly. Most attributes of a vertex represent vectors in the space to be rendered. These vectors are typically 1 (x), 2 (x, y), or 3 (x, y, z) dimensional and can include a fourth homogeneous coordinate (w). These values are given meaning by a material description. In real-time rendering these properties are used by a vertex shader or vertex pipeline. Such attributes can include: Polygons are used in computer graphics to compose images that are three-dimensional in appearance, and are one of the most popular geometric building blocks in computer graphics. Polygons are built up of vertices, and are typically used as triangles. A model's polygons can be rendered and seen simply in a wire frame model, where the outlines of the polygons are seen, as opposed to having them be shaded. This is the reason for a polygon stage in computer animation. The polygon count refers to the number of polygons being rendered per frame. Beginning with the fifth generation of video game consoles, the use of polygons became more common, and with each succeeding generation, polygonal models became increasingly complex. Representations Polygon meshes may be represented in a variety of ways, using different methods to store the vertex, edge and face data. These include: Each of the representations above have particular advantages and drawbacks, further discussed in Smith (2006). The choice of the data structure is governed by the application, the performance required, size of the data, and the operations to be performed. For example, it is easier to deal with triangles than general polygons, especially in computational geometry. For certain operations it is necessary to have a fast access to topological information such as edges or neighboring faces; this requires more complex structures such as the winged-edge representation. For hardware rendering, compact, simple structures are needed; thus the corner-table (triangle fan) is commonly incorporated into low-level rendering APIs such as DirectX and OpenGL. Vertex-vertex meshes represent an object as a set of vertices connected to other vertices. This is the simplest representation, but not widely used since the face and edge information is implicit. Thus, it is necessary to traverse the data in order to generate a list of faces for rendering. In addition, operations on edges and faces are not easily accomplished. However, VV meshes benefit from small storage space and efficient morphing of shape. The above figure shows a four-sided box as represented by a VV mesh. Each vertex indexes its neighboring vertices. The last two vertices, 8 and 9 at the top and bottom center of the "box-cylinder", have four connected vertices rather than five. A general system must be able to handle an arbitrary number of vertices connected to any given vertex. For a complete description of VV meshes see Smith (2006). Face-vertex meshes represent an object as a set of faces and a set of vertices. This is the most widely used mesh representation, being the input typically accepted by modern graphics hardware. Face-vertex meshes improve on VV mesh for modeling in that they allow explicit lookup of the vertices of a face, and the faces surrounding a vertex. The above figure shows the "box-cylinder" example as an FV mesh. Vertex v5 is highlighted to show the faces that surround it. Notice that, in this example, every face is required to have exactly 3 vertices. However, this does not mean every vertex has the same number of surrounding faces. For rendering, the face list is usually transmitted to the GPU as a set of indices to vertices, and the vertices are sent as position/color/normal structures (in the figure, only position is given). This has the benefit that changes in shape, but not geometry, can be dynamically updated by simply resending the vertex data without updating the face connectivity. Modeling requires easy traversal of all structures. With face-vertex meshes it is easy to find the vertices of a face. Also, the vertex list contains a list of faces connected to each vertex. Unlike VV meshes, both faces and vertices are explicit, so locating neighboring faces and vertices is constant time. However, the edges are implicit, so a search is still needed to find all the faces surrounding a given face. Other dynamic operations, such as splitting or merging a face, are also difficult with face-vertex meshes. Introduced by Baumgart in 1975, winged-edge meshes explicitly represent the vertices, faces, and edges of a mesh. This representation is widely used in modeling programs to provide the greatest flexibility in dynamically changing the mesh geometry, because split and merge operations can be done quickly. Their primary drawback is large storage requirements and increased complexity due to maintaining many indices. A good discussion of implementation issues of Winged-edge meshes may be found in the book Graphics Gems II. Winged-edge meshes address the issue of traversing from edge to edge, and providing an ordered set of faces around an edge. For any given edge, the number of outgoing edges may be arbitrary. To simplify this, winged-edge meshes provide only four, the nearest clockwise and counter-clockwise edges at each end. The other edges may be traversed incrementally. The information for each edge therefore resembles a butterfly, hence "winged-edge" meshes. The above figure shows the "box-cylinder" as a winged-edge mesh. The total data for an edge consists of 2 vertices (endpoints), 2 faces (on each side), and 4 edges (winged-edge). Rendering of winged-edge meshes for graphics hardware requires generating a Face index list, which is usually done only when the geometry changes. Winged-edge meshes are ideally suited for dynamic geometry, such as subdivision surfaces and interactive modeling, since changes to the mesh can occur locally. Traversal across the mesh, as might be needed for collision detection, can be accomplished efficiently. See Baumgart (1975) for more details. Winged-edge meshes are not the only representation which allows for dynamic changes to geometry. A new representation which combines winged-edge meshes and face-vertex meshes is the render dynamic mesh, which explicitly stores both, the vertices of a face and faces of a vertex (like FV meshes), and the faces and vertices of an edge (like winged-edge). Render dynamic meshes requires slightly less storage space than standard winged-edge meshes, and can be directly rendered by graphics hardware since the face list contains an index of vertices. In addition, traversal from vertex to face is explicit (constant time), as is from face to vertex. RD meshes do not require the four outgoing edges since these can be found by traversing from edge to face, then face to neighboring edge. RD meshes benefit from the features of winged-edge meshes by allowing for geometry to be dynamically updated. See Tobler & Maierhofer (WSCG 2006) for more details. In the above table, explicit indicates that the operation can be performed in constant time, as the data is directly stored; list compare indicates that a list comparison between two lists must be performed to accomplish the operation; and pair search indicates a search must be done on two indices. The notation avg(V,V) means the average number of vertices connected to a given vertex; avg(E,V) means the average number of edges connected to a given vertex, and avg(F,V) is the average number of faces connected to a given vertex. The notation "V → f1, f2, f3, ... → v1, v2, v3, ..." describes that a traversal across multiple elements is required to perform the operation. For example, to get "all vertices around a given vertex V" using the face-vertex mesh, it is necessary to first find the faces around the given vertex V using the vertex list. Then, from those faces, use the face list to find the vertices around them. Winged-edge meshes explicitly store nearly all information, and other operations always traverse to the edge first to get additional info. Vertex-vertex meshes are the only representation that explicitly stores the neighboring vertices of a given vertex. As the mesh representations become more complex (from left to right in the summary), the amount of information explicitly stored increases. This gives more direct, constant time, access to traversal and topology of various elements but at the cost of increased overhead and space in maintaining indices properly. Figure 7 shows the connectivity information for each of the four technique described in this article. Other representations also exist, such as half-edge and corner tables. These are all variants of how vertices, faces and edges index one another. As a general rule, face-vertex meshes are used whenever an object must be rendered on graphics hardware that does not change geometry (connectivity), but may deform or morph shape (vertex positions) such as real-time rendering of static or morphing objects. Winged-edge or render dynamic meshes are used when the geometry changes, such as in interactive modeling packages or for computing subdivision surfaces. Vertex-vertex meshes are ideal for efficient, complex changes in geometry or topology so long as hardware rendering is not of concern. Other representations File formats There exist many different file formats for storing polygon mesh data. Each format is most effective when used for the purpose intended by its creator. Popular formats include .fbx, .dae, .obj, and .stl. A table of some more of these formats is presented below: See also References External links |
======================================== |
[SOURCE: https://en.wikipedia.org/wiki/Photorealistic_rendering] | [TOKENS: 415] |
Unbiased rendering In computer graphics, unbiased rendering or photorealistic rendering are rendering techniques that avoid systematic errors, or statistical bias, in computing an image’s radiance. Bias in this context means inaccuracies like dimmer light or missing effects such as soft shadows, caused by approximations. Unbiased methods, such as path tracing and its derivatives, simulate real-world lighting and shading with full physical accuracy. In contrast, biased methods, including traditional ray tracing, sacrifice precision for speed by using approximations that introduce errors—often seen as blur. This blur reduces variance (random noise) by averaging light samples, enabling faster computation with fewer samples needed for a clean image. Mathematical definition In mathematical terms, an unbiased estimator's expected value (E) is the population mean, regardless of the number of observations. The errors in an image produced by unbiased rendering are due to random statistical variance, which appears as high-frequency noise. Variance in this context decreases by n (standard deviation decreases by n) for n data points. Consequently, four times as much data is required to halve the standard deviation of the error, making unbiased rendering less suitable for real-time or interactive applications. An image that appears noiseless and smooth from an unbiased renderer is probabilistically correct. Caustics example An unbiased technique, like path tracing, cannot consider all possible light paths due to their infinite number. It may not select ideal paths for a given render, as this would introduce bias. For example, path tracing struggles with caustics from a point light source because it is unlikely to randomly generate the exact path needed for accurate reflection. On the other hand, progressive photon mapping (PPM), a biased technique, handles caustics effectively. Although biased, PPM is consistent, meaning that as the number of samples increases to infinity, the bias error approaches zero, and the probability that the estimate is correct reaches one. List of unbiased rendering methods List of unbiased renderers See also References Bibliography This computer graphics–related article is a stub. You can help Wikipedia by adding missing information. |
======================================== |
[SOURCE: https://en.wikipedia.org/wiki/Texture_mapping#cite_note-5] | [TOKENS: 4408] |
Contents Texture mapping Texture mapping is a term used in computer graphics to describe how 2D images are projected onto 3D models. The most common variant is the UV unwrap, which can be described as an inverse paper cutout, where the surfaces of a 3D model are cut apart so that it can be unfolded into a 2D coordinate space (UV space). Semantic Texture mapping can multiply refer to (1) the task of unwrapping a 3D model (converting the surface of a 3D model into a 2D texture map), (2) applying a 2D texture map onto the surface of a 3D model, and (3) the 3D software algorithm that performs both tasks. A texture map refers to a 2D image ("texture") that adds visual detail to a 3D model. The image can be stored as a raster graphic. A texture that stores a specific property—such as bumpiness, reflectivity, or transparency—is also referred to as a color map or roughness map. The coordinate space that converts from a 3D model's 3D space into a 2D space for sampling from the texture map is variously called UV space, UV coordinates, or texture space. Algorithm The following is a simplified explanation of how an algorithm could work to render an image: History The original technique was pioneered by Edwin Catmull in 1974 as part of his doctoral thesis. Texture mapping originally referred to diffuse mapping, a method that simply mapped pixels from a texture to a 3D surface ("wrapping" the image around the object). In recent decades, the advent of multi-pass rendering, multitexturing, mipmaps, and more complex mappings such as height mapping, bump mapping, normal mapping, displacement mapping, reflection mapping, specular mapping, occlusion mapping, and many other variations on the technique (controlled by a materials system) have made it possible to simulate near-photorealism in real time by vastly reducing the number of polygons and lighting calculations needed to construct a realistic and functional 3D scene. Texture maps A texture map is an image applied ("mapped") to the surface of a shape or polygon. This may be a bitmap image or a procedural texture. They may be stored in common image file formats, referenced by 3D model formats or material definitions, and assembled into resource bundles. They may have one to three dimensions, although two dimensions are most common for visible surfaces. For use with modern hardware, texture map data may be stored in swizzled or tiled orderings to improve cache coherency. Rendering APIs typically manage texture map resources (which may be located in device memory) as buffers or surfaces, and may allow 'render to texture' for additional effects such as post processing or environment mapping. Texture maps usually contain RGB color data (either stored as direct color, compressed formats, or indexed color), and sometimes an additional channel for alpha blending (RGBA) especially for billboards and decal overlay textures. It is possible to use the alpha channel (which may be convenient to store in formats parsed by hardware) for other uses such as specularity. Multiple texture maps (or channels) may be combined for control over specularity, normals, displacement, or subsurface scattering, e.g. for skin rendering. Multiple texture images may be combined in texture atlases or array textures to reduce state changes for modern hardware. (They may be considered a modern evolution of tile map graphics). Modern hardware often supports cube map textures with multiple faces for environment mapping. Texture maps may be acquired by scanning or digital photography, designed in image manipulation software such as GIMP or Photoshop, or painted onto 3D surfaces directly in a 3D paint tool such as Mudbox or ZBrush. This process is akin to applying patterned paper to a plain white box. Every vertex in a polygon is assigned a texture coordinate (which in the 2D case is also known as UV coordinates). This may be done through explicit assignment of vertex attributes, manually edited in a 3D modelling package through UV unwrapping tools. It is also possible to associate a procedural transformation from 3D space to texture space with the material. This might be accomplished via planar projection or, alternatively, cylindrical or spherical mapping. More complex mappings may consider the distance along a surface to minimize distortion. These coordinates are interpolated across the faces of polygons to sample the texture map during rendering. Textures may be repeated or mirrored to extend a finite rectangular bitmap over a larger area, or they may have a one-to-one unique "injective" mapping from every piece of a surface (which is important for render mapping and light mapping, also known as baking). Texture mapping maps the model surface (or screen space during rasterization) into texture space; in this space, the texture map is visible in its undistorted form. UV unwrapping tools typically provide a view in texture space for manual editing of texture coordinates. Some rendering techniques such as subsurface scattering may be performed approximately by texture-space operations. Multitexturing is the use of more than one texture at a time on a polygon. For instance, a light map texture may be used to light a surface as an alternative to recalculating that lighting every time the surface is rendered. Microtextures or detail textures are used to add higher frequency details, and dirt maps add weathering and variation; this can greatly reduce the apparent periodicity of repeating textures. Modern graphics may use more than 10 layers, which are combined using shaders, for greater fidelity. Another multitexture technique is bump mapping, which allows a texture to directly control the facing direction of a surface for the purposes of its lighting calculations; it can give a very good appearance of a complex surface (such as tree bark or rough concrete) that takes on lighting detail in addition to the usual detailed coloring. Bump mapping has become popular in video games, as graphics hardware has become powerful enough to accommodate it in real-time. The way that samples (e.g. when viewed as pixels on the screen) are calculated from the texels (texture pixels) is governed by texture filtering. The cheapest method is to use the nearest-neighbour interpolation, but bilinear interpolation or trilinear interpolation between mipmaps are two commonly used alternatives which reduce aliasing or jaggies. In the event of a texture coordinate being outside the texture, it is either clamped or wrapped. Anisotropic filtering better eliminates directional artefacts when viewing textures from oblique viewing angles. Texture streaming is a means of using data streams for textures, where each texture is available in two or more different resolutions, as to determine which texture should be loaded into memory and used based on draw distance from the viewer and how much memory is available for textures. Texture streaming allows a rendering engine to use low resolution textures for objects far away from the viewer's camera, and resolve those into more detailed textures, read from a data source, as the point of view nears the objects. As an optimization, it is possible to render detail from a complex, high-resolution model or expensive process (such as global illumination) into a surface texture (possibly on a low-resolution model). This technique is called baking (or render mapping) and is most commonly used for light maps, but may also be used to generate normal maps and displacement maps. Some computer games (e.g. Messiah) have used this technique. The original Quake software engine used on-the-fly baking to combine light maps and colour maps in a process called surface caching. Baking can be used as a form of level of detail generation, where a complex scene with many different elements and materials may be approximated by a single element with a single texture, which is then algorithmically reduced for lower rendering cost and fewer drawcalls. It is also used to take high-detail models from 3D sculpting software and point cloud scanning and approximate them with meshes more suitable for realtime rendering. Rasterisation algorithms Various techniques have evolved in software and hardware implementations. Each offers different trade-offs in precision, versatility, and performance. Affine texture mapping linearly interpolates texture coordinates across a surface, making it the fastest form of texture mapping. Some software and hardware (such as the original PlayStation) project vertices in 3D space onto the screen during rendering and linearly interpolate the texture coordinates in screen space between them. This may be done by incrementing fixed-point UV coordinates or by an incremental error algorithm akin to Bresenham's line algorithm. In contrast to perpendicular polygons, this leads to noticeable distortion with perspective transformations (as shown in the figure: the checker box texture appears bent), especially as primitives near the camera. This distortion can be reduced by subdividing polygons into smaller polygons. Using quad primitives for rectangular objects can look less incorrect than if those rectangles were split into triangles. However, since interpolating four points adds complexity to the rasterization, most early implementations preferred triangles only. Some hardware, such as the forward texture mapping used by the Nvidia NV1, offered efficient quad primitives. With perspective correction, triangles become equivalent to quad primitives and this advantage disappears. For rectangular objects that are at right angles to the viewer (like floors and walls), the perspective only needs to be corrected in one direction across the screen rather than both. The correct perspective mapping can be calculated at the left and right edges of the floor. Affine linear interpolation across that horizontal span will look correct because every pixel along that line is the same distance from the viewer. Perspective correct texturing accounts for the vertices' positions in 3D space rather than simply interpolating coordinates in 2D screen space. While achieving the correct visual effect, perspective correct texturing is more expensive to calculate. To perform perspective correction of the texture coordinates u {\displaystyle u} and v {\displaystyle v} , with z {\displaystyle z} being the depth component from the viewer's point of view, it is possible to take advantage of the fact that the values 1 z {\displaystyle {\frac {1}{z}}} , u z {\displaystyle {\frac {u}{z}}} , and v z {\displaystyle {\frac {v}{z}}} are linear in screen space across the surface being textured. In contrast, the original z {\displaystyle z} , u {\displaystyle u} , and v {\displaystyle v} , before the division, are not linear across the surface in screen space. It is therefore possible to linearly interpolate these reciprocals across the surface, computing corrected values at each pixel, to produce a perspective correct texture mapping. To do this, the reciprocals at each vertex of the geometry (three points for a triangle) are calculated. Vertex n {\displaystyle n} has reciprocals u n z n {\displaystyle {\frac {u_{n}}{z_{n}}}} , v n z n {\displaystyle {\frac {v_{n}}{z_{n}}}} , and 1 z n {\displaystyle {\frac {1}{z_{n}}}} . Then, linear interpolation can be done on these reciprocals between the n {\displaystyle n} vertices (e.g., using barycentric coordinates), resulting in interpolated values across the surface. At a given point, this yields the interpolated u i , v i {\displaystyle u_{i},v_{i}} and 1 z i {\displaystyle {\frac {1}{z_{i}}}} (reciprocal z i {\displaystyle z_{i}} ). However, as our division by z {\displaystyle z} altered their coordinate system, this u i , v i {\displaystyle u_{i},v_{i}} cannot be used as texture coordinates. To correct back to the u , v {\displaystyle u,v} space, the corrected z {\displaystyle z} is calculated by taking the reciprocal once again: z c o r r e c t = 1 1 z i {\displaystyle z_{correct}={\frac {1}{\frac {1}{z_{i}}}}} . This is then used to correct the u i , v i {\displaystyle u_{i},v_{i}} coordinates: u c o r r e c t = u i ⋅ z i {\displaystyle u_{correct}=u_{i}\cdot z_{i}} and v c o r r e c t = v i ⋅ z i {\displaystyle v_{correct}=v_{i}\cdot z_{i}} . This correction makes it so that the difference from pixel to pixel between texture coordinates is smaller in parts of the polygon that are closer to the viewer (stretching the texture wider) and is larger in parts that are farther away (compressing the texture). Affine texture mapping directly interpolates a texture coordinate u α {\displaystyle u_{\alpha }} between two endpoints u 0 {\displaystyle u_{0}} and u 1 {\displaystyle u_{1}} : u α = ( 1 − α ) u 0 + α u 1 {\displaystyle u_{\alpha }=(1-\alpha )u_{0}+\alpha u_{1}} where 0 ≤ α ≤ 1 {\displaystyle 0\leq \alpha \leq 1} . Perspective correct mapping interpolates after dividing by depth z {\displaystyle z} , then uses its interpolated reciprocal to recover the correct coordinate: u α = ( 1 − α ) u 0 z 0 + α u 1 z 1 ( 1 − α ) 1 z 0 + α 1 z 1 {\displaystyle u_{\alpha }={\frac {(1-\alpha ){\frac {u_{0}}{z_{0}}}+\alpha {\frac {u_{1}}{z_{1}}}}{(1-\alpha ){\frac {1}{z_{0}}}+\alpha {\frac {1}{z_{1}}}}}} 3D graphics hardware typically supports perspective correct texturing. Various techniques have evolved for rendering texture mapped geometry into images with different quality and precision trade-offs, which can be applied to both software and hardware. Classic software texture mappers generally only performed simple texture mapping with one lighting effect at most (typically applied through a lookup table), and the perspective correctness was about 16 times more expensive.[compared to?] The Doom engine restricted the world to vertical walls and horizontal floors and ceilings, with a camera that could only rotate about the vertical axis. This meant the walls would be a constant depth coordinate along a vertical line and the floors and ceilings would have a constant depth along a horizontal line. After performing one perspective correction calculation for the depth, the rest of the line could use fast affine mapping. Some later renderers of this era simulated a small amount of camera pitch with shearing which allowed the appearance of greater freedom while using the same rendering technique. Some engines were able to render texture mapped heightmaps (e.g. Nova Logic's Voxel Space, and the engine for Outcast) via Bresenham-like incremental algorithms, producing the appearance of a texture mapped landscape without the use of traditional geometric primitives. Every triangle can be further subdivided into groups of about 16 pixels in order to achieve two goals: keeping the arithmetic mill busy at all times and producing faster arithmetic results.[vague] For perspective texture mapping without hardware support, a triangle is broken down into smaller triangles for rendering and affine mapping is used on them. The reason this technique works is that the distortion of affine mapping becomes much less noticeable on smaller polygons. The Sony PlayStation made extensive use of this because it only supported affine mapping in hardware and had a relatively high triangle throughput compared to its peers. Software renderers generally prefer screen subdivision because it has less overhead. Additionally, they try to do linear interpolation along a line of pixels to simplify the set-up (compared to 2D affine interpolation), thus lessening the overhead further. Another reason is that affine texture mapping does not fit into the low number of CPU registers of the x86 CPU; the 68000 and RISC processors are much more suited for that approach. A different approach was taken for Quake, which would calculate perspective correct coordinates only once every 16 pixels of a scanline and linearly interpolate between them, effectively running at the speed of linear interpolation because the perspective correct calculation runs in parallel on the co-processor. As the polygons are rendered independently, it may be possible to switch between spans and columns or diagonal directions depending on the orientation of the polygon normal to achieve a more constant z, but the effort seems not to be worth it.[original research?] One other technique is to approximate the perspective with a faster calculation, such as a polynomial. A second uses the 1 z i {\textstyle {\frac {1}{z_{i}}}} value of the last two drawn pixels to linearly extrapolate the next value. For the latter, the division is then done starting from those values so that all that has to be divided is a small remainder. However, the amount of bookkeeping needed makes this technique too slow on most systems.[citation needed] A third technique, used by the Build Engine (used, most notably, in Duke Nukem 3D), builds on the constant distance trick used by the Doom engine by finding and rendering along the line of constant distance for arbitrary polygons. Texture mapping hardware was originally developed for simulation (e.g. as implemented in the Evans and Sutherland ESIG and Singer-Link Digital Image Generators DIG) and professional graphics workstations (such as Silicon Graphics) and broadcast digital video effects machines such as the Ampex ADO. Texture mapping hardware later appeared in arcade cabinets, consumer video game consoles, and PC video cards in the mid-1990s. In flight simulations, texture mapping provided important motion and altitude cues necessary for pilot training not available on untextured surfaces. Additionally, texture mapping was implemented so that real-time processing of prefiltered texture patterns stored in memory could be accessed by the video processor in real-time. Modern graphics processing units (GPUs) provide specialised fixed function units called texture samplers, or texture mapping units, to perform texture mapping, usually with trilinear filtering or better multi-tap anisotropic filtering and hardware for decoding specific formats such as DXTn. As of 2016, texture mapping hardware is ubiquitous as most SOCs contain a suitable GPU. Some hardware implementations combine texture mapping with hidden-surface determination in tile-based deferred rendering or scanline rendering; such systems only fetch the visible texels at the expense of using greater workspace for transformed vertices. Most systems have settled on the z-buffering approach, which can still reduce the texture mapping workload with front-to-back sorting. On earlier graphics hardware, there were two competing paradigms of how to deliver a texture to the screen: Of these methods, inverse texture mapping has become standard in modern hardware. With this method, a pixel on the screen is mapped to a point on the texture. Each vertex of a rendering primitive is projected to a point on the screen, and each of these points is mapped to a u,v texel coordinate on the texture. A rasterizer will interpolate between these points to fill in each pixel covered by the primitive. The primary advantage of this method is that each pixel covered by a primitive will be traversed exactly once. Once a primitive's vertices are transformed, the amount of remaining work scales directly with how many pixels it covers on the screen. The main disadvantage is that the memory access pattern in the texture space will not be linear if the texture is at an angle to the screen. This disadvantage is often addressed by texture caching techniques, such as the swizzled texture memory arrangement. The linear interpolation can be used directly for simple and efficient affine texture mapping, but can also be adapted for perspective correctness. Forward texture mapping maps each texel of the texture to a pixel on the screen. After transforming a rectangular primitive to a place on the screen, a forward texture mapping renderer iterates through each texel on the texture, splatting each one onto a pixel of the frame buffer. This was used by some hardware, such as the 3DO, the Sega Saturn and the NV1. The primary advantage is that the texture will be accessed in a simple linear order, allowing very efficient caching of the texture data. However, this benefit is also its disadvantage: as a primitive gets smaller on screen, it still has to iterate over every texel in the texture, causing many pixels to be overdrawn redundantly. This method is also well suited for rendering quad primitives rather than reducing them to triangles, which provided an advantage when perspective correct texturing was not available in hardware. This is because the affine distortion of a quad looks less incorrect than the same quad split into two triangles (see the § Affine texture mapping section above). The NV1 hardware also allowed a quadratic interpolation mode to provide an even better approximation of perspective correctness. UV mapping became an important technique for 3D modelling and assisted in clipping the texture correctly when the primitive went past the edge of the screen, but existing hardware did not provide effective implementations of this. These shortcomings could have been addressed with further development, but GPU design has mostly shifted toward using the inverse mapping technique. Applications Beyond 3D rendering, the availability of texture mapping hardware has inspired its use for accelerating other tasks: It is possible to use texture mapping hardware to accelerate both the reconstruction of voxel data sets from tomographic scans, and to visualize the results. Many user interfaces use texture mapping to accelerate animated transitions of screen elements, e.g. Exposé in Mac OS X. See also References Software External links |
======================================== |
[SOURCE: https://en.wikipedia.org/wiki/Texture_compression] | [TOKENS: 553] |
Contents Texture compression Texture compression is a specialized form of image compression designed for storing texture maps in 3D computer graphics rendering systems. Unlike conventional image compression algorithms, texture compression algorithms are optimized for random access. Texture compression can be applied to reduce memory usage at runtime. Texture data is often the largest source of memory usage in a mobile application.[citation needed] Tradeoffs In their seminal paper on texture compression, Beers, Agrawala and Chaddha list four features that tend to differentiate texture compression from other image compression techniques. These features are: Given the above, most texture compression algorithms involve some form of fixed-rate lossy vector quantization of small fixed-size blocks of pixels into small fixed-size blocks of coding bits, sometimes with additional extra pre-processing and post-processing steps. Block Truncation Coding is a very simple example of this family of algorithms. Because their data access patterns are well-defined, texture decompression may be executed on-the-fly during rendering as part of the overall graphics pipeline, reducing overall bandwidth and storage needs throughout the graphics system. As well as texture maps, texture compression may also be used to encode other kinds of rendering map, including bump maps and surface normal maps. Texture compression may also be used together with other forms of map processing such as MIP maps and anisotropic filtering. Availability Some examples of practical texture compression systems are S3 Texture Compression (S3TC), PVRTC, Ericsson Texture Compression (ETC) and Adaptive Scalable Texture Compression (ASTC); these may be supported by special function units in modern Graphics processing units. OpenGL and OpenGL ES, as implemented on many video accelerator cards and mobile GPUs, can support multiple common kinds of texture compression - generally through the use of vendor extensions. Supercompression A compressed-texture can be further compressed in what is called "supercompression". Fixed-rate texture compression formats are optimized for random access and are much less efficient compared to image formats such as PNG. By adding further compression, a programmer can reduce the efficiency gap. The extra layer can be decompressed by the CPU so that the GPU receives a normal compressed texture, or in newer methods, decompressed by the GPU itself. Supercompression saves the same amount of VRAM as regular texture compression, but saves more disk space and download size. Neural Texture Compression Random-Access Neural Compression of Material Textures (Neural Texture Compression) is a Nvidia's technology which enables two additional levels of detail (16x more texels, so four times higher resolution) while maintaining similar storage requirements as traditional texture compression methods. The key idea is compressing multiple material textures and their mipmap chains together, and using a small neural network, that is optimized for each material, to decompress them. See also References External links |
======================================== |
[SOURCE: https://en.wikipedia.org/wiki/Cube_map] | [TOKENS: 1799] |
Contents Cube mapping Pitch: -10° Yaw: -10° Field of view: 80° In computer graphics, cube mapping is a method of environment mapping that uses the six faces of a cube as the map shape. The environment is projected onto the sides of a cube and stored as six square textures, or unfolded into six regions of a single texture. The cube map is generated by first rendering the scene six times from a viewpoint, with the views defined by a 90 degree view frustum representing each cube face. Or if the environment is first considered to be projected onto a sphere, then each face of the cube is its gnomonic projection. In the majority of cases, cube mapping is preferred over the older method of sphere mapping because it eliminates many of the problems that are inherent in sphere mapping such as image distortion, viewpoint dependency, and computational inefficiency. Also, cube mapping provides a much larger capacity to support real-time rendering of reflections relative to sphere mapping because the combination of inefficiency and viewpoint dependency severely limits the ability of sphere mapping to be applied when there is a consistently changing viewpoint. Variants of cube mapping are also commonly used in 360 video projection. History Cube mapping was first proposed in 1986 by Ned Greene in his paper "Environment Mapping and Other Applications of World Projections", ten years after environment mapping was first put forward by Jim Blinn and Martin Newell. However, hardware limitations on the ability to access six texture images simultaneously made it infeasible to implement cube mapping without further technological developments. This problem was remedied in 1999 with the release of the Nvidia GeForce 256. Nvidia touted cube mapping in hardware as "a breakthrough image quality feature of GeForce 256 that ... will allow developers to create accurate, real-time reflections. Accelerated in hardware, cube environment mapping will free up the creativity of developers to use reflections and specular lighting effects to create interesting, immersive environments." Today, cube mapping is still used in a variety of graphical applications as a favored method of environment mapping. Advantages Cube mapping is preferred over other methods of environment mapping because of its relative simplicity. Cube mapping also produces results that are similar to those obtained by ray tracing, but is much more computationally efficient – the moderate reduction in quality is compensated for by large gains in efficiency. Pre-dating cube mapping, sphere mapping has many inherent flaws that made it impractical for most applications. Sphere mapping is view-dependent, meaning that a different texture is necessary for each viewpoint. Therefore, in applications where the viewpoint is mobile, it would be necessary to dynamically generate a new sphere mapping for each new viewpoint (or, to pre-generate a mapping for every viewpoint). Also, a texture mapped onto a sphere's surface must be stretched and compressed, and warping and distortion (particularly along the edge of the sphere) are a direct consequence of this. Although these image flaws can be reduced using certain tricks and techniques like "pre-stretching", this just adds another layer of complexity to sphere mapping. Paraboloid mapping provides some improvement on the limitations of sphere mapping, however it requires two rendering passes in addition to special image warping operations and more involved computation. Conversely, cube mapping requires only a single render pass, and due to its simple nature, is very easy for developers to comprehend and generate. Also, cube mapping uses the entire resolution of the texture image, compared to sphere and paraboloid mappings, which also allows it to use lower resolution images to achieve the same quality. Although handling the seams of the cube map is a problem, algorithms have been developed to handle seam behavior and result in a seamless reflection. Disadvantages Disadvantages include discontinuity, a high about of indexing, linear interpolation of vectors (when calculated in hardware), filtering across texture map boundaries, and possibly the need for multiple textures. Applications Computer-aided design (CAD) programs use specular highlights as visual cues to convey a sense of surface curvature when rendering 3D objects. However, many CAD programs exhibit problems in sampling specular highlights because the specular lighting computations are only performed at the vertices of the mesh used to represent the object, and interpolation is used to estimate lighting across the surface of the object. Problems occur when the mesh vertices are not dense enough, resulting in insufficient sampling of the specular lighting. This in turn results in highlights with brightness proportionate to the distance from mesh vertices, ultimately compromising the visual cues that indicate curvature. However, this problem cannot be solved by simply creating a denser mesh, as this can greatly reduce the efficiency of object rendering. Cube maps provide a fairly straightforward and efficient solution to rendering stable specular highlights. Multiple specular highlights can be encoded into a cube map texture, which can then be accessed by interpolating across the surface's reflection vector to supply coordinates. Relative to computing lighting at individual vertices, this method provides cleaner results that more accurately represent curvature. Another advantage to this method is that it scales well, as additional specular highlights can be encoded into the texture at no increase in the cost of rendering. However, this approach is limited in that the light sources must be either distant or infinite lights, although this is usually the case in CAD programs. Perhaps the most advanced application of cube mapping is to create pre-rendered panoramic sky images which are then rendered by the graphical engine as faces of a cube at practically infinite distance with the view point located in the center of the cube. The perspective projection of the cube faces done by the graphics engine undoes the effects of projecting the environment to create the cube map, so that the observer experiences an illusion of being surrounded by the scene which was used to generate the skybox. This technique has found a widespread use in video games since it allows designers to add complex (albeit not explorable) environments to a game at almost no performance cost. Cube maps can be useful for modelling outdoor illumination accurately. Simply modelling sunlight as a single infinite light oversimplifies outdoor illumination and results in unrealistic lighting. Although plenty of light does come from the sun, the scattering of rays in the atmosphere causes the whole sky to act as a light source (often referred to as skylight illumination). However, by using a cube map, the diffuse contribution from skylight illumination can be captured. Unlike environment maps where the reflection vector is used, this method accesses the cube map based on the surface normal vector to provide a fast approximation of the diffuse illumination from the skylight. The one downside to this method is that computing cube maps to properly represent a skylight is very complex; one recent process is computing the spherical harmonic basis that best represents the low frequency diffuse illumination from the cube map. However, a considerable amount of research has been done to effectively model skylight illumination. Basic environment mapping uses a static cube map – although the object can be moved and distorted, the reflected environment stays consistent. However, a cube map texture can be consistently updated to represent a dynamically changing environment (for example, trees swaying in the wind). A simple yet costly way to generate dynamic reflections involves building the cube maps at runtime for every frame. Although this is far less efficient than static mapping because of additional rendering steps, it can still be performed at interactive rates. However, this technique does not scale well when multiple reflective objects are present. A unique dynamic environment map is usually required for each reflective object. Also, further complications are added if reflective objects can reflect each other – dynamic cube maps can be recursively generated, approximating the effects normally generated using raytracing. An algorithm for global illumination computation at interactive rates using a cube map data structure, was presented at ICCVG 2002. Another application which found widespread use in video games is projective texture mapping. It relies on cube maps to project images of an environment onto the surrounding scene; for example, a point light source is tied to a cube map which is a panoramic image shot from inside a lantern cage or a window frame through which the light is filtering. This enables a game developer to achieve realistic lighting without having to complicate the scene geometry or resort to expensive real-time shadow volume computations. Memory addressing A cube texture indexes six texture maps from 0 to 5 in order: positive X, negative X, positive Y, negative Y, positive Z, negative Z. The images are stored with the origin at the lower left of the image. The positive X and Y faces must reverse the Z coordinate and the negative Z face must negate the X coordinate. If given the face, and texture coordinates ( u , v ) {\displaystyle (u,v)} , the non-normalized vector ( x , y , z ) {\displaystyle (x,y,z)} can be computed by the function: Likewise, a vector ( x , y , z ) {\displaystyle (x,y,z)} can be converted to the face index and texture coordinates ( u , v ) {\displaystyle (u,v)} with the function: See also References |
======================================== |
[SOURCE: https://en.wikipedia.org/wiki/Environment_mapping] | [TOKENS: 1088] |
Contents Reflection mapping In computer graphics, reflection mapping or environment mapping is an efficient image-based lighting technique for approximating the appearance of a reflective surface by means of a precomputed texture. The texture is used to store the image of the distant environment surrounding the rendered object. Several ways of storing the surrounding environment have been employed. The first technique was sphere mapping, in which a single texture contains the image of the surroundings as reflected on a spherical mirror. It has been almost entirely surpassed by cube mapping, in which the environment is projected onto the six faces of a cube and stored as six square textures or unfolded into six square regions of a single texture. Other projections that have some superior mathematical or computational properties include the paraboloid mapping, the pyramid mapping, the octahedron mapping, and the HEALPix mapping. Reflection mapping is one of several approaches to reflection rendering, alongside e.g. screen space reflections or ray tracing which computes the exact reflection by tracing a ray of light and following its optical path. The reflection color used in the shading computation at a pixel is determined by calculating the reflection vector at the point on the object and mapping it to the texel in the environment map. This technique often produces results that are superficially similar to those generated by raytracing, but is less computationally expensive since the radiance value of the reflection comes from calculating the angles of incidence and reflection, followed by a texture lookup, rather than followed by tracing a ray against the scene geometry and computing the radiance of the ray, simplifying the GPU workload. However, in most circumstances a mapped reflection is only an approximation of the real reflection. Environment mapping relies on two assumptions that are seldom satisfied: Environment mapping is generally the fastest method of rendering a reflective surface. To further increase the speed of rendering, the renderer may calculate the position of the reflected ray at each vertex. Then, the position is interpolated across polygons to which the vertex is attached. This eliminates the need for recalculating every pixel's reflection direction. If normal mapping is used, each polygon has many face normals (the direction a given point on a polygon is facing), which can be used in tandem with an environment map to produce a more realistic reflection. In this case, the angle of reflection at a given point on a polygon will take the normal map into consideration. This technique is used to make an otherwise flat surface appear textured, for example corrugated metal, or brushed aluminium. Types Sphere mapping represents the sphere of incident illumination as though it were seen in the reflection of a reflective sphere through an orthographic camera. The texture image can be created by approximating this ideal setup, or using a fisheye lens or via prerendering a scene with a spherical mapping. The spherical mapping suffers from limitations that detract from the realism of resulting renderings. Because spherical maps are stored as azimuthal projections of the environments they represent, an abrupt point of singularity (a "black hole" effect) is visible in the reflection on the object where texel colors at or near the edge of the map are distorted due to inadequate resolution to represent the points accurately. The spherical mapping also wastes pixels that are in the square but not in the sphere. The artifacts of the spherical mapping are so severe that it is effective only for viewpoints near that of the virtual orthographic camera. Cube mapping and other polyhedron mappings address the severe distortion of sphere maps. If cube maps are made and filtered correctly, they have no visible seams, and can be used independent of the viewpoint of the often-virtual camera acquiring the map. Cube and other polyhedron maps have since superseded sphere maps in most computer graphics applications, with the exception of acquiring image-based lighting. Image-based lighting can be done with parallax-corrected cube maps. Generally, cube mapping uses the same skybox that is used in outdoor renderings. Cube-mapped reflection is done by determining the vector that the object is being viewed at. This camera ray is reflected about the surface normal of where the camera vector intersects the object. This results in the reflected ray which is then passed to the cube map to get the texel which provides the radiance value used in the lighting calculation. This creates the effect that the object is reflective. HEALPix environment mapping is similar to the other polyhedron mappings, but can be hierarchical, thus providing a unified framework for generating polyhedra that better approximate the sphere. This allows lower distortion at the cost of increased computation. History In 1974, Edwin Catmull created an algorithm for "rendering images of bivariate surface patches" which worked directly with their mathematical definition. Further refinements were researched and documented by Bui-Tuong Phong in 1975, and later James Blinn and Martin Newell, who developed environment mapping in 1976; these developments which refined Catmull's original algorithms led them to conclude that "these generalizations result in improved techniques for generating patterns and texture". Gene Miller experimented with spherical environment mapping in 1982 at MAGI. Wolfgang Heidrich introduced Paraboloid Mapping in 1998. Emil Praun introduced Octahedron Mapping in 2003. Mauro Steigleder introduced Pyramid Mapping in 2005. Tien-Tsin Wong, et al. introduced the existing HEALPix mapping for rendering in 2006. See also References External links |
======================================== |
[SOURCE: https://en.wikipedia.org/wiki/Image_channels] | [TOKENS: 1138] |
Contents Channel (digital image) Color digital images are made of pixels, and pixels are made of combinations of primary colors represented by a series of code. A channel in this context is the grayscale image of the same size as a color image,[citation needed] made of just one of these primary colors. For instance, an image from a standard digital camera will have a red, green and blue channel. A grayscale image has just one channel. In geographic information systems, channels are often referred to as raster bands. Another closely related concept is feature maps, which are used in convolutional neural networks. Overview In the digital realm, there can be any number of conventional primary colors making up an image; a channel in this case is extended to be the grayscale image based on any such conventional primary color. By extension, a channel is any grayscale image of the same dimension as and associated with the original image[citation needed]. Channel is a conventional term used to refer to a certain component of an image. In reality, any image format can use any algorithm internally to store images. For instance, GIF images actually refer to the color in each pixel by an index number, which refers to a table where three color components are stored. However, regardless of how a specific format stores the images, discrete color channels can always be determined, as long as a final color image can be rendered. The concept of channels is extended beyond the visible spectrum in multispectral and hyperspectral imaging. In that context, each channel corresponds to a range of wavelengths and contains spectroscopic information. The channels can have multiple widths and ranges. Three main channel types (or color models) exist, and have respective strengths and weaknesses. An RGB image has three channels: red, green, and blue. RGB channels roughly follow the color receptors in the human eye, and are used in computer displays and image scanners. If the RGB image is 24-bit (the industry standard as of 2005), each channel has 8 bits, for red, green, and blue—in other words, the image is composed of three images (one for each channel), where each image can store discrete pixels with conventional brightness intensities between 0 and 255. If the RGB image is 48-bit (very high color-depth), each channel has 16-bit per pixel color, that is 16-bit red, green, and blue for each per pixel. Notice how the grey trees have similar brightness in all channels, the red dress is much brighter in the red channel than in the other two, and how the green part of the picture is shown much brighter in the green channel. YUV images are an affine transformation of the RGB colorspace, originated in broadcasting. The Y channel correlates approximately with perceived intensity, whilst the U and V channels provide colour information. A CMYK image has four channels: cyan, magenta, yellow, and key (black). CMYK is the standard for print, where subtractive coloring is used. A 32-bit CMYK image (the industry standard as of 2005) is made of four 8-bit channels, one for cyan, one for magenta, one for yellow, and one for key color (typically is black). 64-bit storage for CMYK images (16-bit per channel) is not common, since CMYK is usually device-dependent, whereas RGB is the generic standard for device-independent storage. HSV, or hue saturation value, stores color information in three channels, just like RGB, but one channel is devoted to brightness (value), and the other two convey colour information. The value channel is similar to (but not exactly the same as) the CMYK black channel, or its negative. HSV is especially useful in lossy video compression, where loss of color information is less noticeable to the human eye. Alpha channel The alpha channel stores transparency information—the higher the value, the more opaque that pixel is. No camera or scanner measures transparency, although physical objects certainly can possess transparency, but the alpha channel is extremely useful for compositing digital images together. Bluescreen technology involves filming actors in front of a primary color background, then setting that color to transparent, and compositing it with a background. The GIF and PNG image formats use alpha channels on the World Wide Web to merge images on web pages so that they appear to have an arbitrary shape even on a non-uniform background. Other channels In 3D computer graphics, multiple channels are used for additional control over material rendering; e.g., controlling specularity and so on. Bit depth In digitizing images, the color channels are converted to numbers. Since images contain thousands of pixels, each with multiple channels, channels are usually encoded in as few bits as possible. Typical values are 8 bits per channel or 16 bits per channel. Indexed color effectively gets rid of channels altogether to get, for instance, 3 channels into 8 bits (GIF) or 16 bits. Optimized channel sizes Since the brain does not necessarily perceive distinctions in each channel to the same degree as in other channels, it is possible that differing the number of bits allocated to each channel will result in more optimal storage; in particular, for RGB images, compressing the blue channel the most and the red channel the least may be better than giving equal space to each.[citation needed] Among other techniques, lossy video compression uses chroma subsampling to reduce the bit depth in color channels (hue and saturation), while keeping all brightness information (value in HSV). 16-bit HiColor stores red and blue in 5 bits, and green in 6 bits. References |
======================================== |
[SOURCE: https://en.wikipedia.org/wiki/RGBA] | [TOKENS: 1041] |
Contents RGBA color model RGBA stands for red green blue alpha. While it is sometimes described as a color space, it is actually a three-channel RGB color model supplemented with a fourth alpha channel. Alpha indicates how opaque each pixel is and allows an image to be combined over others using alpha compositing, with transparent areas and anti-aliasing of the edges of opaque regions. Each pixel is a 4D vector. The term does not define what RGB color space is being used. It also does not state whether or not the colors are premultiplied by the alpha value, and if they are it does not state what color space that premultiplication was done in. This means more information than just "RGBA" is needed to determine how to handle an image. In some contexts the abbreviation "RGBA" means a specific memory layout (called RGBA8888 below), with other terms such as "BGRA" used for alternatives. In other contexts "RGBA" means any layout. Representation In computer graphics, pixels encoding the RGBA color space information must be stored in computer memory (or in files on disk). In most cases four equal-sized pieces of adjacent memory are used, one for each channel, and a 0 in a channel indicates black color or transparent alpha, while all-1 bits indicates white or fully opaque alpha. By far the most common format is to store 8 bits (one byte) for each channel, which is 32 bits for each pixel. The order of these four bytes in memory can differ, which can lead to confusion when image data is exchanged. These encodings are often denoted by the four letters in some order (most commonly RGBA). The interpretation of these 4-letter mnemonics is not well established. There are two typical ways to understand the mnemonic "RGBA": In a big-endian system, the two schemes are equivalent. This is not the case for a little-endian system, where the two mnemonics are reverses of each other. Therefore, to be unambiguous, it is important to state which ordering is used when referring to the encoding. This article will use a scheme that has some popularity, which is to add the suffix "8888" to indicate if 4 8-bit units or "32" if one 32-bit unit are being discussed. In OpenGL and Portable Network Graphics (PNG), the RGBA byte order is used, where the colors are stored in memory such that R is at the lowest address, G after it, B after that, and A last. On a little endian architecture this is equivalent to ABGR32. In many systems when there are more than 8 bits per channel (such as 16 bits or floating-point), the channels are stored in RGBA order, even if 8-bit channels are stored in some other order. The channels are arranged in memory in such manner that a single 32-bit unsigned integer has the alpha sample in the highest 8 bits, followed by the red sample, green sample and finally the blue sample in the lowest 8 bits: ARGB values are typically expressed using 8 hexadecimal digits, with each pair of the hexadecimal digits representing the values of the Alpha, Red, Green and Blue channel, respectively. For example, 80FFFF00 represents 50.2% opaque (non-premultiplied) yellow. The 80 hex value, which is 128 in decimal, represents a 50.2% alpha value because 128 is approximately 50.2% of the maximum value of 255 (FF hex); to continue to decipher the 80FFFF00 value, the first FF represents the maximum value red can have; the second FF is like the previous but for green; the final 00 represents the minimum value blue can have (effectively – no blue). Consequently, red + green yields yellow. In cases where the alpha is not used this can be shortened to 6 digits RRGGBB, this is why it was chosen to put the alpha in the top bits. Depending on the context a 0x or a number sign (#) is put before the hex digits. This layout became popular when 24-bit color (and 32-bit RGBA) was introduced on personal computers. At the time it was much faster and easier for programs to manipulate one 32-bit unit than four 8-bit units. On little-endian systems, this is equivalent to BGRA byte order. On big-endian systems, this is equivalent to ARGB byte order. In some software originating on big-endian machines such as Silicon Graphics, colors were stored in 32 bits similar to ARGB32, but with the alpha in the bottom 8 bits rather than the top. For example, 808000FF would be Red and Green:50.2%, Blue:0% and Alpha:100%, a brown. This is what you would get if RGBA8888 data was read as words on these machines. It is used in Portable Arbitrary Map and in FLTK, but in general it is rare. The bytes are stored in memory on a little-endian machine in the order ABGR. See also References External links |
======================================== |
[SOURCE: https://en.wikipedia.org/wiki/Texture_atlases] | [TOKENS: 205] |
Contents Texture atlas In computer graphics, a texture atlas (also called a spritesheet or an image sprite in 2D game development) is an image containing multiple smaller images, usually packed together to reduce overall dimensions. An atlas can consist of uniformly-sized images or images of varying dimensions. A sub-image is drawn using custom texture coordinates to pick it out of the atlas. Benefits In an application where many small textures are used frequently, it is often more efficient to store the textures in a texture atlas which is treated as a single unit by the graphics hardware. This reduces both the disk I/O overhead and the overhead of a context switch by increasing memory locality. Careful alignment may be needed to avoid bleeding between sub textures when used with mipmapping and texture compression. In web development, images are packed into a sprite sheet to reduce the number of image resources that need to be fetched in order to display a page. Gallery References External links This computer graphics–related article is a stub. You can help Wikipedia by adding missing information. |
======================================== |
[SOURCE: https://en.wikipedia.org/wiki/Photoshop] | [TOKENS: 6082] |
Contents Adobe Photoshop Adobe Photoshop is a raster graphics editor developed and published by Adobe for Windows and macOS. It was created in 1987 by Thomas and John Knoll. It is the most used tool for professional digital art, especially in raster graphics editing, and its name has become genericised as a verb (e.g., to "photoshop" an image, "photoshopping", and "photoshop contest") although Adobe disapproves of such use. Photoshop can edit and compose raster images in multiple layers and supports masks, alpha compositing and several color models. Photoshop uses its own PSD and PSB file formats to support these features. In addition to raster graphics, Photoshop has limited abilities to edit or render text and vector graphics (especially through clipping path for the latter), as well as 3D graphics and video. Its feature set can be expanded by plug-ins; programs developed and distributed independently of Photoshop that run inside it and offer new or enhanced features. Photoshop's naming scheme was initially based on version numbers. However, in October 2002 (following the introduction of Creative Suite branding), each new version of Photoshop was designated with "CS" plus a number; e.g., the eighth major version of Photoshop was Photoshop CS and the ninth was Photoshop CS2. Photoshop CS3 through CS6 were also distributed in two different editions: Standard and Extended. With the introduction of the Creative Cloud branding in June 2013 (and, in turn, the change of the "CS" suffix to "CC"), Photoshop's licensing scheme was changed to that of subscription model. Historically, Photoshop was bundled with additional software such as Adobe ImageReady, Adobe Fireworks, Adobe Bridge, Adobe Device Central and Adobe Camera RAW. Alongside Photoshop, Adobe also develops and publishes Photoshop Elements, Photoshop Lightroom, Photoshop Express, Photoshop Fix, Adobe Illustrator, and Photoshop Mix. As of November 2019, Adobe has also released a full version of Photoshop for the iPad, and while initially limited, Adobe plans to bring more features to Photoshop for iPad. Collectively, they are branded as "The Adobe Photoshop Family". Early history Photoshop was developed in 1987 by two brothers, Thomas and John Knoll, who sold the distribution license to Adobe Systems Incorporated in 1988. Thomas Knoll, a Ph.D. student at the University of Michigan, began writing a program on his Macintosh Plus to display grayscale images on a monochrome display. This program (at that time called Display) caught the attention of his brother John, an Industrial Light & Magic employee, who recommended that Thomas turn it into a full-fledged image editing program. Thomas took a six-month break from his studies in 1988 to collaborate with his brother on the program. Thomas renamed the program ImagePro, but the name was already taken. Later that year, Thomas renamed his program Photoshop and worked out a short-term deal with scanner manufacturer Barneyscan to distribute copies of the program with a slide scanner; a "total of about 200 copies of Photoshop were shipped" this way. During this time, John traveled to Silicon Valley and gave a demonstration of the program to engineers at Apple Computer and Russell Brown, art director at Adobe. Both showings were successful, and Adobe decided to purchase the license to distribute in September 1988. While John worked on plug-ins in California, Thomas remained in Ann Arbor writing code. Photoshop 1.0 was released on February 19, 1990, for Macintosh exclusively. The Barneyscan version included advanced color editing features that were stripped from the first Adobe shipped version. The handling of color slowly improved with each release from Adobe and Photoshop quickly became the industry standard in digital color editing. When Photoshop 1.0 was released, digital retouching on dedicated high-end systems (such as the Scitex) cost around $300 an hour for basic photo retouching. The list price of Photoshop 1.0 for Macintosh in 1990 was $895. Photoshop was initially only available on Macintosh. In 1993, Adobe chief architect Seetharaman Narayanan ported Photoshop to Microsoft Windows. The Windows port led to Photoshop reaching a wider mass market audience as Microsoft's global reach expanded within the next few years. On March 31, 1995, Adobe purchased the rights for Photoshop from Thomas and John Knoll for $34.5 million so Adobe would no longer need to pay a royalty for each copy sold. File format Photoshop files have default file extension as .PSD, which stands for "Photoshop Document". A PSD file stores an image with support for all features of Photoshop; these include layers with masks, transparency, text, alpha channels and spot colors, clipping paths, and duotone settings. This is in contrast to many other file formats (e.g., .JPG or .GIF) that restrict content to provide streamlined, predictable functionality. A PSD file has a maximum height and width of 30,000 pixels, and a size limit of two gigabytes. From the beginning, Photoshop could save files in other formats, including TIF, JPEG, and GIF. These files are smaller than PSD files because they lack the editable features of a PSD file. These formats are required to use the file in publications or on the web. Adobe's discontinued program PageMaker required TIF format. Photoshop can also create and use files with the extension .PSB, which stands for "Photoshop Big" (also known as "large document format"). A PSB file extends the PSD file format, increasing the maximum height and width to 300,000 pixels and the size limit to around 4 exabytes. PSD and PSB formats are documented. Because of Photoshop's popularity, PSD files are widely used and supported to some extent by most competing software, including GIMP, Affinity Photo, and Clip Studio Paint. The .PSD file format can be exported to and from Adobe's other apps, such as Adobe Illustrator, Adobe Premiere Pro, and After Effects. Plugins Photoshop functionality can be extended by add-on programs called Photoshop plugins (or plug-ins). Adobe creates some, such as Adobe Camera Raw, but most are developed by third-parties. Some are free and some are commercial software. Most plugins work with only Photoshop or Photoshop-compatible hosts, but a few can also be run as standalone applications. There are various types of plugins, such as filter, export, import, selection, color correction, and automation. The most popular plugins are the filter plugins (also known as a 8bf plugins), available under the Filter menu in Photoshop. Filter plugins can either modify the current image or create content. Below are some popular types of plugins, and some well-known companies associated with them: Adobe Camera Raw (also known as ACR and Camera Raw) is a special plugin, supplied free by Adobe, used primarily to read and process raw image files so that the resulting images can be processed by Photoshop. It can also be used from within Adobe Bridge. Cultural impact Photoshop and derivatives such as Photoshopped (or just Shopped) have become verbs that are sometimes used to refer to images edited by Photoshop, or any image manipulation program. The same happens not only in English but as the Portuguese Wikipedia entry for image manipulation attests, even in that language, with the trademark being followed by the Portuguese verb termination -ar, yielding the word "photoshopar" (to photoshop). Such derivatives are discouraged by Adobe because, in order to maintain validity and protect the trademark from becoming generic, trademarks must be used as proper nouns. Version history Photoshop's naming scheme was initially based on version numbers, from version 0.63 (codename "Bond"; double-oh-seven), through version 0.87 (codename "Seurat" which was the first commercial version, sold as "Barneyscan XP"), version 1.0 (February 1990) all the way to version 7.0.1. Adobe published 7 major and many minor versions before the October 2003 introduction of version 8.0 which brought with it the Creative Suite branding. Notable milestone features would be: Filters, Colour Separation, Virtual Memory (1.0), Paths, CMYK color (2.0), 16-bits-per-channel support, availability on Microsoft Windows (2.5), Layers, tabbed Palettes (3.0), Adjustments, Actions, Freeform Transform, PNG support (4.0), Editable Type, Magnetic Lasso and Pen, Freeform Pen, Multiple Undo, Layer Effects (5.0), Save For Web (5.5), Vector Shapes, revised User Interface (6.0), Vector Text, Healing Brush, Spell Check (7.0), Camera RAW (7.0.1). In February 2013 Adobe donated the source code of the 1990 1.0.1 version of Photoshop to the Computer History Museum. Version 0.63 (October 1988) was the first known copy of Photoshop, though it was never publicly released. Version 0.87 (March 1989) was the first publicly available version of Photoshop, distributed commercially under the name "Barneyscan XP".[citation needed] Photoshop 1.0 was released in February 1990. Photoshop 2.0 was released in June 1991. It added support for paths and the CMYK color model. Photoshop 2.5, released in November 1992, was the first version available for Windows. Photoshop 3.0 was released in September 1994 for Mac OS 7. The Windows version came out later in November. Notably, this was the first version that brought Layers. Photoshop 4.0 was released in November 1996. Photoshop 5.0 was released in May 1998. Photoshop 6.0 was released in September 2000. Photoshop 7.0 was released in March 2002. The first Photoshop CS was commercially released in October 2003 as the eighth major version of Photoshop. Photoshop CS increased user control with a reworked file browser augmenting search versatility, sorting and sharing capabilities and the Histogram Palette which monitors changes in the image as they are made to the document. Match Color was also introduced in CS, which reads color data to achieve a uniform expression throughout a series of pictures. Photoshop CS2, released in May 2005, expanded on its predecessor with a new set of tools and features. It included an upgraded spot healing brush, which is mainly used for handling common photographic problems such as blemishes, red-eye, noise, blurring and lens distortion. One of the most significant inclusions in CS2 was the implementation of smart objects, which allows users to scale and transform images and vector illustrations without losing image quality, as well as create linked duplicates of embedded graphics so that a single edit updates across multiple iterations. Adobe responded to feedback from the professional media industry by implementing non-destructive editing as well as the producing and modifying of 32-bit high dynamic range (HDR) images, which are optimal for 3D rendering and advanced compositing. FireWire previews could also be viewed on a monitor via a direct export feature. Photoshop CS2 brought the vanishing point and image warping tools. Vanishing point tool makes tedious graphic and photo retouching endeavors much simpler by letting users clone, paint and transform image objects while maintaining visual perspective. Image warping tool makes it easy to digitally distort an image into a shape by choosing on-demand presets or by dragging control points. The file browser was upgraded to Adobe Bridge, which functioned as a hub for productivity, imagery and creativity, providing multi-view file browsing and smooth cross-product integration across Adobe Creative Suite 2 software. Adobe Bridge also provided access to Adobe Stock Photos, a new stock photography service that offered users one-stop shopping across five elite stock image providers to deliver high-quality, royalty-free images for layout and design. Camera raw version 3.0 was a new addition in CS2, and it allowed settings for multiple raw files to be modified simultaneously. In addition, processing multiple raw files to other formats including JPEG, TIFF, DNG or PSD, could be done in the background without executing Photoshop itself. Photoshop CS2 brought a streamlined interface, making it easier to access features for specific instances. In CS2 users were also given the ability to create their own custom presets, which was meant to save time and increase productivity. In January 2013, Photoshop CS2 was released with a published serial number due to a technical glitch in Adobe's CS2 activation servers (see Creative Suite 1 and 2). CS3 and CS3 Extended were released in April 2007 to the United States and Canada. They were also made available through Adobe's online store and Adobe Authorized Resellers. Both CS3 and CS3 Extended are offered as either a stand-alone application or feature of Adobe Creative Suite. Both products are compatible with Intel-based Macs and PowerPCs, supporting Windows XP and Windows Vista. CS3 is the first release of Photoshop that will run natively on Macs with Intel processors: previous versions can only run through the translation layer Rosetta, and will not run at all on Macs running Mac OS X 10.7 or later. CS3 improves on features from previous versions of Photoshop and introduces new tools. One of the most significant is the streamlined interface which allows increased performance, speed, and efficiency. There is also improved support for Camera RAW files which allow users to process images with higher speed and conversion quality. CS3 supports over 150 RAW formats as well as JPEG, TIFF and PDF. Enhancements were made to the Black and White Conversion, Brightness and Contrast Adjustment and Vanishing Point Module tools. The Black and White adjustment option improves control over manual grayscale conversions with a dialog box similar to that of Channel Mixer. There is more control over print options and better management with Adobe Bridge. The Clone Source palette is introduced, adding more options to the clone stamp tool. Other features include the nondestructive Smart Filters, optimizing graphics for mobile devices, Fill Light and Dust Busting tools. Compositing is assisted with Photoshop's new Quick Selection and Refine Edge tools and improved image stitching technology. CS3 Extended includes everything in CS3 and additional features. There are tools for 3D graphic file formats, video enhancement and animation, and comprehensive image measurement and analysis tools with DICOM file support. The 3D graphic formats allow 3D content to be incorporated into 2D compositions. As for video editing, CS3 supports layers and video formatting so users can edit video files per frame. CS4 and CS4 Extended were released on October 15, 2008. They were also made available through Adobe's online store and Adobe Authorized Resellers. Both CS4 and CS4 Extended are offered as either a stand-alone application or feature of Adobe Creative Suite. Both products are compatible with Intel-based Mac OS X and PowerPCs, supporting Windows XP and Windows Vista. CS4 features smoother panning and zooming, allowing faster image editing at a high magnification. The interface is more simplified with its tab-based interface making it cleaner to work with. Photoshop CS4 features a new 3D engine allowing the conversion of gradient maps to 3D objects, adding depth to layers and text, and getting print-quality output with the new ray-tracing rendering engine. It supports common 3D formats; the new Adjustment and Mask panels; content-aware scaling (seam carving); fluid canvas rotation and File display options. The content-aware scaling allows users to intelligently size and scale images, and the canvas rotation tool makes it easier to rotate and edit images from any angle. Adobe released Photoshop CS4 Extended, which has the features of Adobe Photoshop CS4, plus capabilities for scientific imaging, 3D, motion graphics, accurate image analysis and high-end film and video users. The faster 3D engine allows users to paint directly on 3D models, wrap 2D images around 3D shapes and animate 3D objects. As the successor to Photoshop CS3, Photoshop CS4 is the first x64 edition of Photoshop on consumer computers for Windows. The color correction tool has also been improved significantly. Photoshop CS5 was launched on April 12, 2010. In a video posted on its official Facebook page, the development team revealed the new technologies under development, including three-dimensional brushes and warping tools. In May 2011, Adobe Creative Suite 5.5 (CS5.5) was released, with new versions of some of the applications. Its version of Photoshop, 12.1, is identical to the concurrently released update for Photoshop CS5, version 12.0.4, except for support for the new subscription pricing that was introduced with CS5.5. CS5 introduces new tools such as the Content-Aware Fill, Refine Edge, Mixer Brush, Bristle Tips and Puppet Warp. The community also had a hand in the additions made to CS5 as 30 new features and improvements were included by request. These include automatic image straightening, the Rule-of-Thirds cropping tool, color pickup, and saving a 16-bit image as a JPEG. Another feature includes the Adobe Mini Bridge, which allows for efficient file browsing and management. CS5 Extended includes everything in CS5 plus features in 3D and video editing. A new materials library was added, providing more options such as Chrome, Glass, and Cork. The new Shadow Catcher tool can be used to further enhance 3D objects. For motion graphics, the tools can be applied to over more than one frame in a video sequence. CS5 and CS5 Extended were made available through Adobe's online store, Adobe Authorized Resellers and Adobe direct sales. Both CS5 and CS5 Extended are offered as either a stand-alone application or a feature of Adobe Creative Suite 5. Both products are compatible with Intel-based Mac OS X and Windows XP, Windows Vista, and Windows 7. Photoshop CS6, released in May 2012, added new creative design tools and provided a redesigned interface with a focus on enhanced performance. New features have been added to the Content-Aware tool such as the Content-Aware Patch and Content-Aware Move. Adobe Photoshop CS6 brought a suite of tools for video editing. Color and exposure adjustments, as well as layers, are among a few things that are featured in this new editor. Upon completion of editing, the user is presented with a handful of options of exporting into a few popular formats. CS6 brings the "straighten" tool to Photoshop, where a user simply draws a line anywhere on an image, and the canvas will reorient itself so that the line drawn becomes horizontal, and adjusts the media accordingly. This was created with the intention that users will draw a line parallel to a plane in the image, and reorient the image to that plane to more easily achieve certain perspectives. CS6 allows background saving, which means that while another document is compiling and archiving itself, it is possible to simultaneously edit an image. CS6 also features a customizable auto-save feature, preventing any work from being lost. With version 13.1.3, Adobe dropped support for Windows XP (including Windows XP Professional x64 Edition); thus, the last version that works on Windows XP is 13.0.1. Adobe also announced that CS6 will be the last suite sold with perpetual licenses in favor of the new Creative Cloud subscriptions, though they will continue to provide OS compatibility support as well as bug fixes and security updates as necessary. Starting January 9, 2017, CS6 is no longer available for purchase, making a Creative Cloud license the only purchase option going forward. No more updates will be available for all CS6 software either. Photoshop CC (14.0) was launched on June 18, 2013. As the next major version after CS6, it is only available as part of a Creative Cloud subscription. Major features in this version include new Smart Sharpen, Intelligent Upsampling, and Camera Shake Reduction for reducing blur caused by camera shake. Editable Rounded Rectangles and an update to Adobe Camera Raw (8.0) were also included. Since the initial launch, Adobe has released two additional feature-bearing updates. The first, version 14.1, was launched on September 9, 2013. The major features in this version were Adobe Generator, a Node.js-based platform for creating plug-ins for Photoshop. Photoshop 14.1 shipped with two plug-ins, one to automatically generate image assets based on an extension in the layer name, and another to automatically generate assets for Adobe Edge Reflow. Version 14.2 was released on January 15, 2014. Major features include Perspective Warp, Linked Smart Objects, and 3D Printing support. Photoshop CC 2014 (15.0) was released on June 18, 2014. CC 2014 features improvements to content-aware tools, two new blur tools (spin blur and path blur) and a new focus mask feature that enables the user to select parts of an image based on whether they are in focus or not. Other minor improvements have been made, including speed increases for certain tasks. Photoshop CC 2015 was released on June 15, 2015. Adobe added various creative features including Adobe Stock, which is a library of custom stock images. It also includes and have the ability to have more than one layer style. For example, in the older versions of Photoshop, only one shadow could be used for a layer but in CC 2015, up to ten are available. Other minor features like Export As, which is a form of the Save For Web in CC 2014 were also added. The updated UI as of November 30, 2015, delivers a cleaner and more consistent look throughout Photoshop, and the user can quickly perform common tasks using a new set of gestures on touch-enabled devices like Microsoft Surface Pro. CC 2015 also marks the 25th anniversary of Photoshop. Photoshop CC 2017 was released on November 2, 2016. It introduced a new template selector when creating new documents, the ability to search for tools, panels and help articles for Photoshop, support for SVG OpenType fonts and other small improvements. In December 2016, a minor update was released to include support for the MacBook Pro Touch Bar. Photoshop CC 2018 (version 19) was released on October 18, 2017. It featured an overhaul to the brush organization system, allowing for more properties (such as color and opacity) to be saved per-brush and for brushes to be categorized in folders and sub-folders. It also added brush stroke smoothing, and over 1000 brushes created by Kyle T. Webster (following Adobe's acquisition of his website, KyleBrush.com). A Curvature Pen tool, similar to the one in Illustrator, was added, allowing for faster creation of Bézier paths. Other additions were Lightroom Photo access, Variable font support, select subject, copy-paste layers, enhanced tooltips, 360 panorama and HEIF support, PNG compression, increased maximum zoom level, symmetry mode, algorithm improvements to Face-aware and selection tools, color and luminance range masking, improved image resizing, and performance improvements to file opening, filters, and brush strokes. Photoshop CC 2019 was released on October 15, 2018. Beginning with Photoshop CC 2019 (version 20.0), the 32-bit version of Windows is no longer supported. This version Introduced a new tool called Frame Tool to create placeholder frames for images. It also added multiple undo mode, auto-commitment, and prevented accidental panel moves with lock work-space. Live blend mode previews are added, allowing for faster scrolling over different blend mode options in the layers panel. Other additions were Color Wheel, Transform proportionally without Shift key, Distribute spacing like in Illustrator, ability to see longer layer names, match font with Japanese fonts, flip document view, scale UI to font, reference point hidden by default, new compositing engine, which provides a more modern compositing architecture is added which is easier to optimize on all platforms. Photoshop 2020 was released on November 4, 2019. Version 21 has many new and enhanced features like the new object selection tool for better automation of complex selections, new properties panel, enhanced transform warp, new keyboard shortcuts for paint & brush and background image removal option. It added several improvements to the new content-aware fill and to the new document tab. Also added were animated GIF support, improved lens blur performance and one-click zoom to a layer's contents. It introduced new swatches, gradients, patterns, shapes and stylistic sets for OpenType fonts. With this version users now can easily convert smart objects to layers and also can adjust 32-bit layers for brightness/contrast and curves. Presets are now more intuitive to use and easier to organize. With the February 2020 update (version 21.1) Photoshop now can iteratively fill multiple areas of an image without having to leave content-aware fill workspace. This version improved GPU based lens blur quality and provided performance improvements, such as accelerating workflows with smoother panning, zooming and navigation of documents. Version 21 was the first version where the iPad version was released. With Photoshop on the iPad, combined with the new Cloud PSD file format, a user can save cloud documents and work across Windows, Mac and iPad. Photoshop on the iPad does not have all the features of the desktop Photoshop. Adobe promises to update Photoshop on the iPad at "a much more aggressive pace than it has with its current Creative Cloud apps for the desktop". Adobe has provided a timeline for enhancing Photoshop on the iPad to have more of the features of desktop Photoshop. Version 21.2 of the desktop version was released in June 2020. It introduced faster portrait selection, Adobe Camera Raw improvements, auto-activated Adobe Fonts, rotatable patterns, and improved Match Font. Version 22.0.0 was released in October 2020. Version 22.0.1 was released in November 2020. Version 22.1.0 was released in December 2020. Version 22.1.1 was released in January 2021. Version 22.2 was released in February 2021. Version 22.3 was released in March 2021. This is the first macOS release to run natively on Apple silicon. Version 22.3.1 was released in April 2021. Version 22.4 was released in May 2021. Version 22.4.1 was released in May 2021. Version 22.4.2 was released in June 2021. Version 22.4.3 was released in July 2021. Version 22.5 was released in August 2021. Version 22.5.1 was released in September 2021. Final version to include (as Legacy Swatches) a large set of Pantone color books, including Pastels & Neons, and Premium Metallics. Version 23.0 was released in October 2021. First version to include (as Legacy Swatches) a reduced set of Pantone color books - only CMYK, Metallics and Solid colors. Content Credentials (Beta) was introduced. When enabled, the editing information is captured in a tamper-evident form and resides with the file through successive copy generations. It aligns with the C2PA standard on digital provenance across the internet. Version 23.0.1 was released in November 2021. Version 23.0.2 was released in November 2021. Version 23.1 was released in December 2021. Version 23.1.1 was released in January 2022. Version 23.2 was released in February 2022. Version 23.3 was released in April 2022. Version 23.4 was released in June 2022. Version 23.5 was released in August 2022. Final version with built-in support for basic Pantone colors - CMYK, Metallics and Solid (as Legacy Swatches). Future versions require a separate subscription to access Pantone colors. Version 24.0 was released in October 2022. First version without built-in support for Pantone colors. All Pantone colors have been removed as of August 16, 2022. Separate paid subscription now required to access Pantone Connect extension and download color "fandecks". Version 24.1 was released in December 2022. Version 24.4.1 was released on April 20, 2023. Version 24.7 was released on July 27, 2023. Version 25.0 was released in September 2023. This version added Generative Fill and Generative Expand for commercial use. This was the last version where the CPU requirements on the Intel platform were limited to only SSE 4.2 instructions, which meant the x86-64-v2 microarchitecture (Intel Nehalem and newer, AMD Bulldozer and newer). Version 26 was released in October 2024. The CPU requirements on the Intel platform have been increased to support AVX2 instructions, which means the x86-64-v3 microarchitecture (Intel Haswell and newer, AMD Excavator and newer). Adobe Photoshop family The Adobe Photoshop family is a group of applications and services made by Adobe for the use of professional image editing. Several features of the Adobe Photoshop family are pixel manipulating, image organizing, photo retouching, and more. See also References Further reading External links |
======================================== |
[SOURCE: https://en.wikipedia.org/wiki/Injective] | [TOKENS: 2005] |
Contents Injective function In mathematics, an injective function (also known as injection, or one-to-one function) is a function f that maps distinct elements of its domain to distinct elements of its codomain; that is, x1 ≠ x2 implies f(x1) ≠ f(x2) (equivalently by contraposition, f(x1) = f(x2) implies x1 = x2). In other words, every element of the function's codomain is the image of at most one element of its domain. The term one-to-one function must not be confused with one-to-one correspondence that refers to bijective functions, which are functions such that each element in the codomain is an image of exactly one element in the domain. A homomorphism between algebraic structures is a function that is compatible with the operations of the structures. For all common algebraic structures, and, in particular for vector spaces, an injective homomorphism is also called a monomorphism. However, in the more general context of category theory, the definition of a monomorphism differs from that of an injective homomorphism. This is thus a theorem that they are equivalent for algebraic structures; see Homomorphism § Monomorphism for more details. A function f {\displaystyle f} that is not injective is sometimes called many-to-one. Definition Let f {\displaystyle f} be a function whose domain is a set X {\displaystyle X} . The function f {\displaystyle f} is said to be injective provided that for all a {\displaystyle a} and b {\displaystyle b} in X , {\displaystyle X,} if f ( a ) = f ( b ) {\displaystyle f(a)=f(b)} , then a = b {\displaystyle a=b} ; that is, f ( a ) = f ( b ) {\displaystyle f(a)=f(b)} implies a = b {\displaystyle a=b} . Equivalently, if a ≠ b {\displaystyle a\neq b} , then f ( a ) ≠ f ( b ) {\displaystyle f(a)\neq f(b)} in the contrapositive statement. Symbolically, ∀ a , b ∈ X , f ( a ) = f ( b ) ⇒ a = b , {\displaystyle \forall a,b\in X,\;\;f(a)=f(b)\Rightarrow a=b,} which is logically equivalent to the contrapositive, ∀ a , b ∈ X , a ≠ b ⇒ f ( a ) ≠ f ( b ) . {\displaystyle \forall a,b\in X,\;\;a\neq b\Rightarrow f(a)\neq f(b).} An injective function (or, more generally, a monomorphism) is often denoted by using the specialized arrows ↣ or ↪ (for example, f : A ↣ B {\displaystyle f:A\rightarrowtail B} or f : A ↪ B {\displaystyle f:A\hookrightarrow B} ), although some authors specifically reserve ↪ for an inclusion map. Examples For visual examples, readers are directed to the gallery section. More generally, when X {\displaystyle X} and Y {\displaystyle Y} are both the real line R {\displaystyle \mathbb {R} } , then an injective function f : R → R {\displaystyle f:\mathbb {R} \to \mathbb {R} } is one whose graph is never intersected by any horizontal line more than once. This principle is referred to as the horizontal line test. Injections can be undone Functions with left inverses are always injections. That is, given f : X → Y {\displaystyle f:X\to Y} , if there is a function g : Y → X {\displaystyle g:Y\to X} such that for every x ∈ X {\displaystyle x\in X} , g ( f ( x ) ) = x {\displaystyle g(f(x))=x} , then f {\displaystyle f} is injective. The proof is that f ( a ) = f ( b ) → g ( f ( a ) ) = g ( f ( b ) ) → a = b . {\displaystyle f(a)=f(b)\rightarrow g(f(a))=g(f(b))\rightarrow a=b.} In this case, g {\displaystyle g} is called a retraction of f {\displaystyle f} . Conversely, f {\displaystyle f} is called a section of g {\displaystyle g} . For example: f : R → R 2 , x ↦ ( 1 , m ) ⊺ x {\displaystyle f:\mathbb {R} \rightarrow \mathbb {R} ^{2},x\mapsto (1,m)^{\intercal }x} is retracted by g : y ↦ ( 1 , m ) 1 + m 2 y {\displaystyle g:y\mapsto {\frac {(1,m)}{1+m^{2}}}y} . Conversely, every injection f {\displaystyle f} with a non-empty domain has a left inverse g {\displaystyle g} . It can be defined by choosing an element a {\displaystyle a} in the domain of f {\displaystyle f} and setting g ( y ) {\displaystyle g(y)} to the unique element of the pre-image f − 1 [ y ] {\displaystyle f^{-1}[y]} (if it is non-empty) or to a {\displaystyle a} (otherwise). The left inverse g {\displaystyle g} is not necessarily an inverse of f , {\displaystyle f,} because the composition in the other order, f ∘ g {\displaystyle f\circ g} , may differ from the identity on Y {\displaystyle Y} . In other words, an injective function can be "reversed" by a left inverse, but is not necessarily invertible, which requires that the function is bijective. Injections may be made invertible In fact, to turn an injective function f : X → Y {\displaystyle f:X\to Y} into a bijective (hence invertible) function, it suffices to replace its codomain Y {\displaystyle Y} by its actual image J = f ( X ) . {\displaystyle J=f(X).} That is, let g : X → J {\displaystyle g:X\to J} such that g ( x ) = f ( x ) {\displaystyle g(x)=f(x)} for all x ∈ X {\displaystyle x\in X} ; then g {\displaystyle g} is bijective. Indeed, f {\displaystyle f} can be factored as In J , Y ∘ g {\displaystyle \operatorname {In} _{J,Y}\circ g} , where In J , Y {\displaystyle \operatorname {In} _{J,Y}} is the inclusion function from J {\displaystyle J} into Y {\displaystyle Y} . More generally, injective partial functions are called partial bijections. Other properties Proving that functions are injective A proof that a function f {\displaystyle f} is injective depends on how the function is presented and what properties the function holds. For functions that are given by some formula there is a basic idea. We use the definition of injectivity, namely that if f ( x ) = f ( y ) {\displaystyle f(x)=f(y)} , then x = y {\displaystyle x=y} . Here is an example: f ( x ) = 2 x + 3 {\displaystyle f(x)=2x+3} Proof: Let f : X → Y {\displaystyle f:X\to Y} . Suppose f ( x ) = f ( y ) {\displaystyle f(x)=f(y)} . So 2 x + 3 = 2 y + 3 {\displaystyle 2x+3=2y+3} implies 2 x = 2 y {\displaystyle 2x=2y} , which implies x = y {\displaystyle x=y} . Therefore, it follows from the definition that f {\displaystyle f} is injective. There are multiple other methods of proving that a function is injective. For example, in calculus if f {\displaystyle f} is a differentiable function defined on some interval, then it is sufficient to show that the derivative is always positive or always negative on that interval. In linear algebra, if f {\displaystyle f} is a linear transformation it is sufficient to show that the kernel of f {\displaystyle f} contains only the zero vector. If f {\displaystyle f} is a function with finite domain it is sufficient to look through the list of images of each domain element and check that no image occurs twice on the list. A graphical approach for a real-valued function f {\displaystyle f} of a real variable x {\displaystyle x} is the horizontal line test. If every horizontal line intersects the curve of f ( x ) {\displaystyle f(x)} in at most one point, then f {\displaystyle f} is injective or one-to-one. Gallery See also Notes References External links |
======================================== |
[SOURCE: https://en.wikipedia.org/wiki/UV_coordinate] | [TOKENS: 61] |
Glossary of computer graphics This is a glossary of terms relating to computer graphics. For more general computer hardware terms, see glossary of computer hardware terms. 0–9 A B C D E F G H I K L M N O P Q R S T U V W Z References |
======================================== |
[SOURCE: https://en.wikipedia.org/wiki/Light_mapping] | [TOKENS: 1017] |
Contents Lightmap A lightmap is a data structure used in lightmapping, a form of surface caching in which the brightness of surfaces in a virtual scene is pre-calculated and stored in texture maps for later use. Lightmaps are most commonly applied to static objects in applications that use real-time 3D computer graphics, such as video games, in order to provide lighting effects such as global illumination at a relatively low computational cost. History John Carmack's Quake was the first computer game to use lightmaps to augment rendering. Before lightmaps were invented, realtime applications relied purely on Gouraud shading to interpolate vertex lighting for surfaces. This only allowed low frequency lighting information, and could create clipping artifacts close to the camera without perspective-correct interpolation. Discontinuity meshing was sometimes used especially with radiosity solutions to adaptively improve the resolution of vertex lighting information, however the additional cost in primitive setup for realtime rasterization was generally prohibitive. Quake's software rasterizer used surface caching to apply lighting calculations in texture space once when polygons initially appear within the viewing frustum (effectively creating temporary 'lit' versions of the currently visible textures as the viewer negotiated the scene). As consumer 3d graphics hardware capable of multitexturing, light-mapping became more popular, and engines began to combine light-maps in real time as a secondary multiply-blend texture layer. Limitations Lightmaps are composed of lumels (lumination elements), analogous to texels in texture mapping. Smaller lumels yield a higher resolution lightmap, providing finer lighting detail at the price of reduced performance and increased memory usage. For example, a lightmap scale of 4 lumels per world unit would give a lower quality than a scale of 16 lumels per world unit. Thus, in using the technique, level designers and 3d artists often have to make a compromise between performance and quality; if high resolution lightmaps are used too frequently then the application may consume excessive system resources, negatively affecting performance. Lightmap resolution and scaling may also be limited by the amount of disk storage space, bandwidth/download time, or texture memory available to the application. Some implementations attempt to pack multiple lightmaps together in a process known as atlasing to help circumvent these limitations. Lightmap resolution and scale are two different things. The resolution is the area, in pixels, available for storing one or more surface's lightmaps. The number of individual surfaces that can fit on a lightmap is determined by the scale. Lower scale values mean higher quality and more space taken on a lightmap. Higher scale values mean lower quality and less space taken. A surface can have a lightmap that has the same area, so a 1:1 ratio, or smaller, so the lightmap is stretched to fit. Lightmaps in games are usually colored texture maps. They are usually flat, without information about the light's direction, whilst some game engines use multiple lightmaps to provide approximate directional information to combine with normal-maps. Lightmaps may also store separate precalculated components of lighting information for semi-dynamic lighting with shaders, such as ambient-occlusion & sunlight shadowing. Creation When creating lightmaps, any lighting model may be used, because the lighting is entirely precomputed and real-time performance is not always a necessity. A variety of techniques including ambient occlusion, direct lighting with sampled shadow edges, and full radiosity bounce light solutions are typically used. Modern 3D packages include specific plugins for applying light-map UV-coordinates, atlas-ing multiple surfaces into single texture sheets, and rendering the maps themselves. Alternatively game engine pipelines may include custom lightmap creation tools. An additional consideration is the use of compressed DXT textures which are subject to blocking artifacts – individual surfaces must not collide on 4x4 texel chunks for best results. In all cases, soft shadows for static geometry are possible if simple occlusion tests (such as basic ray-tracing) are used to determine which lumels are visible to the light. However, the actual softness of the shadows is determined by how the engine interpolates the lumel data across a surface, and can result in a pixelated look if the lumels are too large. See texture filtering. Lightmaps can also be calculated in real-time for good quality colored lighting effects that are not prone to the defects of Gouraud shading, although shadow creation must still be done using another method such as stencil shadow volumes or shadow mapping, as real-time ray-tracing is still too slow to perform on modern hardware in most 3D engines. Photon mapping can be used to calculate global illumination for light maps. Alternatives In vertex lighting, lighting information is computed per vertex and stored in vertex color attributes. The two techniques may be combined, e.g. vertex color values stored for high detail meshes, whilst light maps are only used for coarser geometry. In discontinuity mapping, the scene may be further subdivided and clipped along major changes in light and dark to better define shadows. See also References |
======================================== |
[SOURCE: https://en.wikipedia.org/wiki/3D_paint_tool] | [TOKENS: 61] |
Glossary of computer graphics This is a glossary of terms relating to computer graphics. For more general computer hardware terms, see glossary of computer hardware terms. 0–9 A B C D E F G H I K L M N O P Q R S T U V W Z References |
======================================== |
[SOURCE: https://en.wikipedia.org/wiki/Texture_mapping#cite_note-10] | [TOKENS: 4408] |
Contents Texture mapping Texture mapping is a term used in computer graphics to describe how 2D images are projected onto 3D models. The most common variant is the UV unwrap, which can be described as an inverse paper cutout, where the surfaces of a 3D model are cut apart so that it can be unfolded into a 2D coordinate space (UV space). Semantic Texture mapping can multiply refer to (1) the task of unwrapping a 3D model (converting the surface of a 3D model into a 2D texture map), (2) applying a 2D texture map onto the surface of a 3D model, and (3) the 3D software algorithm that performs both tasks. A texture map refers to a 2D image ("texture") that adds visual detail to a 3D model. The image can be stored as a raster graphic. A texture that stores a specific property—such as bumpiness, reflectivity, or transparency—is also referred to as a color map or roughness map. The coordinate space that converts from a 3D model's 3D space into a 2D space for sampling from the texture map is variously called UV space, UV coordinates, or texture space. Algorithm The following is a simplified explanation of how an algorithm could work to render an image: History The original technique was pioneered by Edwin Catmull in 1974 as part of his doctoral thesis. Texture mapping originally referred to diffuse mapping, a method that simply mapped pixels from a texture to a 3D surface ("wrapping" the image around the object). In recent decades, the advent of multi-pass rendering, multitexturing, mipmaps, and more complex mappings such as height mapping, bump mapping, normal mapping, displacement mapping, reflection mapping, specular mapping, occlusion mapping, and many other variations on the technique (controlled by a materials system) have made it possible to simulate near-photorealism in real time by vastly reducing the number of polygons and lighting calculations needed to construct a realistic and functional 3D scene. Texture maps A texture map is an image applied ("mapped") to the surface of a shape or polygon. This may be a bitmap image or a procedural texture. They may be stored in common image file formats, referenced by 3D model formats or material definitions, and assembled into resource bundles. They may have one to three dimensions, although two dimensions are most common for visible surfaces. For use with modern hardware, texture map data may be stored in swizzled or tiled orderings to improve cache coherency. Rendering APIs typically manage texture map resources (which may be located in device memory) as buffers or surfaces, and may allow 'render to texture' for additional effects such as post processing or environment mapping. Texture maps usually contain RGB color data (either stored as direct color, compressed formats, or indexed color), and sometimes an additional channel for alpha blending (RGBA) especially for billboards and decal overlay textures. It is possible to use the alpha channel (which may be convenient to store in formats parsed by hardware) for other uses such as specularity. Multiple texture maps (or channels) may be combined for control over specularity, normals, displacement, or subsurface scattering, e.g. for skin rendering. Multiple texture images may be combined in texture atlases or array textures to reduce state changes for modern hardware. (They may be considered a modern evolution of tile map graphics). Modern hardware often supports cube map textures with multiple faces for environment mapping. Texture maps may be acquired by scanning or digital photography, designed in image manipulation software such as GIMP or Photoshop, or painted onto 3D surfaces directly in a 3D paint tool such as Mudbox or ZBrush. This process is akin to applying patterned paper to a plain white box. Every vertex in a polygon is assigned a texture coordinate (which in the 2D case is also known as UV coordinates). This may be done through explicit assignment of vertex attributes, manually edited in a 3D modelling package through UV unwrapping tools. It is also possible to associate a procedural transformation from 3D space to texture space with the material. This might be accomplished via planar projection or, alternatively, cylindrical or spherical mapping. More complex mappings may consider the distance along a surface to minimize distortion. These coordinates are interpolated across the faces of polygons to sample the texture map during rendering. Textures may be repeated or mirrored to extend a finite rectangular bitmap over a larger area, or they may have a one-to-one unique "injective" mapping from every piece of a surface (which is important for render mapping and light mapping, also known as baking). Texture mapping maps the model surface (or screen space during rasterization) into texture space; in this space, the texture map is visible in its undistorted form. UV unwrapping tools typically provide a view in texture space for manual editing of texture coordinates. Some rendering techniques such as subsurface scattering may be performed approximately by texture-space operations. Multitexturing is the use of more than one texture at a time on a polygon. For instance, a light map texture may be used to light a surface as an alternative to recalculating that lighting every time the surface is rendered. Microtextures or detail textures are used to add higher frequency details, and dirt maps add weathering and variation; this can greatly reduce the apparent periodicity of repeating textures. Modern graphics may use more than 10 layers, which are combined using shaders, for greater fidelity. Another multitexture technique is bump mapping, which allows a texture to directly control the facing direction of a surface for the purposes of its lighting calculations; it can give a very good appearance of a complex surface (such as tree bark or rough concrete) that takes on lighting detail in addition to the usual detailed coloring. Bump mapping has become popular in video games, as graphics hardware has become powerful enough to accommodate it in real-time. The way that samples (e.g. when viewed as pixels on the screen) are calculated from the texels (texture pixels) is governed by texture filtering. The cheapest method is to use the nearest-neighbour interpolation, but bilinear interpolation or trilinear interpolation between mipmaps are two commonly used alternatives which reduce aliasing or jaggies. In the event of a texture coordinate being outside the texture, it is either clamped or wrapped. Anisotropic filtering better eliminates directional artefacts when viewing textures from oblique viewing angles. Texture streaming is a means of using data streams for textures, where each texture is available in two or more different resolutions, as to determine which texture should be loaded into memory and used based on draw distance from the viewer and how much memory is available for textures. Texture streaming allows a rendering engine to use low resolution textures for objects far away from the viewer's camera, and resolve those into more detailed textures, read from a data source, as the point of view nears the objects. As an optimization, it is possible to render detail from a complex, high-resolution model or expensive process (such as global illumination) into a surface texture (possibly on a low-resolution model). This technique is called baking (or render mapping) and is most commonly used for light maps, but may also be used to generate normal maps and displacement maps. Some computer games (e.g. Messiah) have used this technique. The original Quake software engine used on-the-fly baking to combine light maps and colour maps in a process called surface caching. Baking can be used as a form of level of detail generation, where a complex scene with many different elements and materials may be approximated by a single element with a single texture, which is then algorithmically reduced for lower rendering cost and fewer drawcalls. It is also used to take high-detail models from 3D sculpting software and point cloud scanning and approximate them with meshes more suitable for realtime rendering. Rasterisation algorithms Various techniques have evolved in software and hardware implementations. Each offers different trade-offs in precision, versatility, and performance. Affine texture mapping linearly interpolates texture coordinates across a surface, making it the fastest form of texture mapping. Some software and hardware (such as the original PlayStation) project vertices in 3D space onto the screen during rendering and linearly interpolate the texture coordinates in screen space between them. This may be done by incrementing fixed-point UV coordinates or by an incremental error algorithm akin to Bresenham's line algorithm. In contrast to perpendicular polygons, this leads to noticeable distortion with perspective transformations (as shown in the figure: the checker box texture appears bent), especially as primitives near the camera. This distortion can be reduced by subdividing polygons into smaller polygons. Using quad primitives for rectangular objects can look less incorrect than if those rectangles were split into triangles. However, since interpolating four points adds complexity to the rasterization, most early implementations preferred triangles only. Some hardware, such as the forward texture mapping used by the Nvidia NV1, offered efficient quad primitives. With perspective correction, triangles become equivalent to quad primitives and this advantage disappears. For rectangular objects that are at right angles to the viewer (like floors and walls), the perspective only needs to be corrected in one direction across the screen rather than both. The correct perspective mapping can be calculated at the left and right edges of the floor. Affine linear interpolation across that horizontal span will look correct because every pixel along that line is the same distance from the viewer. Perspective correct texturing accounts for the vertices' positions in 3D space rather than simply interpolating coordinates in 2D screen space. While achieving the correct visual effect, perspective correct texturing is more expensive to calculate. To perform perspective correction of the texture coordinates u {\displaystyle u} and v {\displaystyle v} , with z {\displaystyle z} being the depth component from the viewer's point of view, it is possible to take advantage of the fact that the values 1 z {\displaystyle {\frac {1}{z}}} , u z {\displaystyle {\frac {u}{z}}} , and v z {\displaystyle {\frac {v}{z}}} are linear in screen space across the surface being textured. In contrast, the original z {\displaystyle z} , u {\displaystyle u} , and v {\displaystyle v} , before the division, are not linear across the surface in screen space. It is therefore possible to linearly interpolate these reciprocals across the surface, computing corrected values at each pixel, to produce a perspective correct texture mapping. To do this, the reciprocals at each vertex of the geometry (three points for a triangle) are calculated. Vertex n {\displaystyle n} has reciprocals u n z n {\displaystyle {\frac {u_{n}}{z_{n}}}} , v n z n {\displaystyle {\frac {v_{n}}{z_{n}}}} , and 1 z n {\displaystyle {\frac {1}{z_{n}}}} . Then, linear interpolation can be done on these reciprocals between the n {\displaystyle n} vertices (e.g., using barycentric coordinates), resulting in interpolated values across the surface. At a given point, this yields the interpolated u i , v i {\displaystyle u_{i},v_{i}} and 1 z i {\displaystyle {\frac {1}{z_{i}}}} (reciprocal z i {\displaystyle z_{i}} ). However, as our division by z {\displaystyle z} altered their coordinate system, this u i , v i {\displaystyle u_{i},v_{i}} cannot be used as texture coordinates. To correct back to the u , v {\displaystyle u,v} space, the corrected z {\displaystyle z} is calculated by taking the reciprocal once again: z c o r r e c t = 1 1 z i {\displaystyle z_{correct}={\frac {1}{\frac {1}{z_{i}}}}} . This is then used to correct the u i , v i {\displaystyle u_{i},v_{i}} coordinates: u c o r r e c t = u i ⋅ z i {\displaystyle u_{correct}=u_{i}\cdot z_{i}} and v c o r r e c t = v i ⋅ z i {\displaystyle v_{correct}=v_{i}\cdot z_{i}} . This correction makes it so that the difference from pixel to pixel between texture coordinates is smaller in parts of the polygon that are closer to the viewer (stretching the texture wider) and is larger in parts that are farther away (compressing the texture). Affine texture mapping directly interpolates a texture coordinate u α {\displaystyle u_{\alpha }} between two endpoints u 0 {\displaystyle u_{0}} and u 1 {\displaystyle u_{1}} : u α = ( 1 − α ) u 0 + α u 1 {\displaystyle u_{\alpha }=(1-\alpha )u_{0}+\alpha u_{1}} where 0 ≤ α ≤ 1 {\displaystyle 0\leq \alpha \leq 1} . Perspective correct mapping interpolates after dividing by depth z {\displaystyle z} , then uses its interpolated reciprocal to recover the correct coordinate: u α = ( 1 − α ) u 0 z 0 + α u 1 z 1 ( 1 − α ) 1 z 0 + α 1 z 1 {\displaystyle u_{\alpha }={\frac {(1-\alpha ){\frac {u_{0}}{z_{0}}}+\alpha {\frac {u_{1}}{z_{1}}}}{(1-\alpha ){\frac {1}{z_{0}}}+\alpha {\frac {1}{z_{1}}}}}} 3D graphics hardware typically supports perspective correct texturing. Various techniques have evolved for rendering texture mapped geometry into images with different quality and precision trade-offs, which can be applied to both software and hardware. Classic software texture mappers generally only performed simple texture mapping with one lighting effect at most (typically applied through a lookup table), and the perspective correctness was about 16 times more expensive.[compared to?] The Doom engine restricted the world to vertical walls and horizontal floors and ceilings, with a camera that could only rotate about the vertical axis. This meant the walls would be a constant depth coordinate along a vertical line and the floors and ceilings would have a constant depth along a horizontal line. After performing one perspective correction calculation for the depth, the rest of the line could use fast affine mapping. Some later renderers of this era simulated a small amount of camera pitch with shearing which allowed the appearance of greater freedom while using the same rendering technique. Some engines were able to render texture mapped heightmaps (e.g. Nova Logic's Voxel Space, and the engine for Outcast) via Bresenham-like incremental algorithms, producing the appearance of a texture mapped landscape without the use of traditional geometric primitives. Every triangle can be further subdivided into groups of about 16 pixels in order to achieve two goals: keeping the arithmetic mill busy at all times and producing faster arithmetic results.[vague] For perspective texture mapping without hardware support, a triangle is broken down into smaller triangles for rendering and affine mapping is used on them. The reason this technique works is that the distortion of affine mapping becomes much less noticeable on smaller polygons. The Sony PlayStation made extensive use of this because it only supported affine mapping in hardware and had a relatively high triangle throughput compared to its peers. Software renderers generally prefer screen subdivision because it has less overhead. Additionally, they try to do linear interpolation along a line of pixels to simplify the set-up (compared to 2D affine interpolation), thus lessening the overhead further. Another reason is that affine texture mapping does not fit into the low number of CPU registers of the x86 CPU; the 68000 and RISC processors are much more suited for that approach. A different approach was taken for Quake, which would calculate perspective correct coordinates only once every 16 pixels of a scanline and linearly interpolate between them, effectively running at the speed of linear interpolation because the perspective correct calculation runs in parallel on the co-processor. As the polygons are rendered independently, it may be possible to switch between spans and columns or diagonal directions depending on the orientation of the polygon normal to achieve a more constant z, but the effort seems not to be worth it.[original research?] One other technique is to approximate the perspective with a faster calculation, such as a polynomial. A second uses the 1 z i {\textstyle {\frac {1}{z_{i}}}} value of the last two drawn pixels to linearly extrapolate the next value. For the latter, the division is then done starting from those values so that all that has to be divided is a small remainder. However, the amount of bookkeeping needed makes this technique too slow on most systems.[citation needed] A third technique, used by the Build Engine (used, most notably, in Duke Nukem 3D), builds on the constant distance trick used by the Doom engine by finding and rendering along the line of constant distance for arbitrary polygons. Texture mapping hardware was originally developed for simulation (e.g. as implemented in the Evans and Sutherland ESIG and Singer-Link Digital Image Generators DIG) and professional graphics workstations (such as Silicon Graphics) and broadcast digital video effects machines such as the Ampex ADO. Texture mapping hardware later appeared in arcade cabinets, consumer video game consoles, and PC video cards in the mid-1990s. In flight simulations, texture mapping provided important motion and altitude cues necessary for pilot training not available on untextured surfaces. Additionally, texture mapping was implemented so that real-time processing of prefiltered texture patterns stored in memory could be accessed by the video processor in real-time. Modern graphics processing units (GPUs) provide specialised fixed function units called texture samplers, or texture mapping units, to perform texture mapping, usually with trilinear filtering or better multi-tap anisotropic filtering and hardware for decoding specific formats such as DXTn. As of 2016, texture mapping hardware is ubiquitous as most SOCs contain a suitable GPU. Some hardware implementations combine texture mapping with hidden-surface determination in tile-based deferred rendering or scanline rendering; such systems only fetch the visible texels at the expense of using greater workspace for transformed vertices. Most systems have settled on the z-buffering approach, which can still reduce the texture mapping workload with front-to-back sorting. On earlier graphics hardware, there were two competing paradigms of how to deliver a texture to the screen: Of these methods, inverse texture mapping has become standard in modern hardware. With this method, a pixel on the screen is mapped to a point on the texture. Each vertex of a rendering primitive is projected to a point on the screen, and each of these points is mapped to a u,v texel coordinate on the texture. A rasterizer will interpolate between these points to fill in each pixel covered by the primitive. The primary advantage of this method is that each pixel covered by a primitive will be traversed exactly once. Once a primitive's vertices are transformed, the amount of remaining work scales directly with how many pixels it covers on the screen. The main disadvantage is that the memory access pattern in the texture space will not be linear if the texture is at an angle to the screen. This disadvantage is often addressed by texture caching techniques, such as the swizzled texture memory arrangement. The linear interpolation can be used directly for simple and efficient affine texture mapping, but can also be adapted for perspective correctness. Forward texture mapping maps each texel of the texture to a pixel on the screen. After transforming a rectangular primitive to a place on the screen, a forward texture mapping renderer iterates through each texel on the texture, splatting each one onto a pixel of the frame buffer. This was used by some hardware, such as the 3DO, the Sega Saturn and the NV1. The primary advantage is that the texture will be accessed in a simple linear order, allowing very efficient caching of the texture data. However, this benefit is also its disadvantage: as a primitive gets smaller on screen, it still has to iterate over every texel in the texture, causing many pixels to be overdrawn redundantly. This method is also well suited for rendering quad primitives rather than reducing them to triangles, which provided an advantage when perspective correct texturing was not available in hardware. This is because the affine distortion of a quad looks less incorrect than the same quad split into two triangles (see the § Affine texture mapping section above). The NV1 hardware also allowed a quadratic interpolation mode to provide an even better approximation of perspective correctness. UV mapping became an important technique for 3D modelling and assisted in clipping the texture correctly when the primitive went past the edge of the screen, but existing hardware did not provide effective implementations of this. These shortcomings could have been addressed with further development, but GPU design has mostly shifted toward using the inverse mapping technique. Applications Beyond 3D rendering, the availability of texture mapping hardware has inspired its use for accelerating other tasks: It is possible to use texture mapping hardware to accelerate both the reconstruction of voxel data sets from tomographic scans, and to visualize the results. Many user interfaces use texture mapping to accelerate animated transitions of screen elements, e.g. Exposé in Mac OS X. See also References Software External links |
======================================== |
[SOURCE: https://en.wikipedia.org/wiki/Render_mapping] | [TOKENS: 61] |
Glossary of computer graphics This is a glossary of terms relating to computer graphics. For more general computer hardware terms, see glossary of computer hardware terms. 0–9 A B C D E F G H I K L M N O P Q R S T U V W Z References |
======================================== |
[SOURCE: https://en.wikipedia.org/wiki/Texture_mapping#cite_note-9] | [TOKENS: 4408] |
Contents Texture mapping Texture mapping is a term used in computer graphics to describe how 2D images are projected onto 3D models. The most common variant is the UV unwrap, which can be described as an inverse paper cutout, where the surfaces of a 3D model are cut apart so that it can be unfolded into a 2D coordinate space (UV space). Semantic Texture mapping can multiply refer to (1) the task of unwrapping a 3D model (converting the surface of a 3D model into a 2D texture map), (2) applying a 2D texture map onto the surface of a 3D model, and (3) the 3D software algorithm that performs both tasks. A texture map refers to a 2D image ("texture") that adds visual detail to a 3D model. The image can be stored as a raster graphic. A texture that stores a specific property—such as bumpiness, reflectivity, or transparency—is also referred to as a color map or roughness map. The coordinate space that converts from a 3D model's 3D space into a 2D space for sampling from the texture map is variously called UV space, UV coordinates, or texture space. Algorithm The following is a simplified explanation of how an algorithm could work to render an image: History The original technique was pioneered by Edwin Catmull in 1974 as part of his doctoral thesis. Texture mapping originally referred to diffuse mapping, a method that simply mapped pixels from a texture to a 3D surface ("wrapping" the image around the object). In recent decades, the advent of multi-pass rendering, multitexturing, mipmaps, and more complex mappings such as height mapping, bump mapping, normal mapping, displacement mapping, reflection mapping, specular mapping, occlusion mapping, and many other variations on the technique (controlled by a materials system) have made it possible to simulate near-photorealism in real time by vastly reducing the number of polygons and lighting calculations needed to construct a realistic and functional 3D scene. Texture maps A texture map is an image applied ("mapped") to the surface of a shape or polygon. This may be a bitmap image or a procedural texture. They may be stored in common image file formats, referenced by 3D model formats or material definitions, and assembled into resource bundles. They may have one to three dimensions, although two dimensions are most common for visible surfaces. For use with modern hardware, texture map data may be stored in swizzled or tiled orderings to improve cache coherency. Rendering APIs typically manage texture map resources (which may be located in device memory) as buffers or surfaces, and may allow 'render to texture' for additional effects such as post processing or environment mapping. Texture maps usually contain RGB color data (either stored as direct color, compressed formats, or indexed color), and sometimes an additional channel for alpha blending (RGBA) especially for billboards and decal overlay textures. It is possible to use the alpha channel (which may be convenient to store in formats parsed by hardware) for other uses such as specularity. Multiple texture maps (or channels) may be combined for control over specularity, normals, displacement, or subsurface scattering, e.g. for skin rendering. Multiple texture images may be combined in texture atlases or array textures to reduce state changes for modern hardware. (They may be considered a modern evolution of tile map graphics). Modern hardware often supports cube map textures with multiple faces for environment mapping. Texture maps may be acquired by scanning or digital photography, designed in image manipulation software such as GIMP or Photoshop, or painted onto 3D surfaces directly in a 3D paint tool such as Mudbox or ZBrush. This process is akin to applying patterned paper to a plain white box. Every vertex in a polygon is assigned a texture coordinate (which in the 2D case is also known as UV coordinates). This may be done through explicit assignment of vertex attributes, manually edited in a 3D modelling package through UV unwrapping tools. It is also possible to associate a procedural transformation from 3D space to texture space with the material. This might be accomplished via planar projection or, alternatively, cylindrical or spherical mapping. More complex mappings may consider the distance along a surface to minimize distortion. These coordinates are interpolated across the faces of polygons to sample the texture map during rendering. Textures may be repeated or mirrored to extend a finite rectangular bitmap over a larger area, or they may have a one-to-one unique "injective" mapping from every piece of a surface (which is important for render mapping and light mapping, also known as baking). Texture mapping maps the model surface (or screen space during rasterization) into texture space; in this space, the texture map is visible in its undistorted form. UV unwrapping tools typically provide a view in texture space for manual editing of texture coordinates. Some rendering techniques such as subsurface scattering may be performed approximately by texture-space operations. Multitexturing is the use of more than one texture at a time on a polygon. For instance, a light map texture may be used to light a surface as an alternative to recalculating that lighting every time the surface is rendered. Microtextures or detail textures are used to add higher frequency details, and dirt maps add weathering and variation; this can greatly reduce the apparent periodicity of repeating textures. Modern graphics may use more than 10 layers, which are combined using shaders, for greater fidelity. Another multitexture technique is bump mapping, which allows a texture to directly control the facing direction of a surface for the purposes of its lighting calculations; it can give a very good appearance of a complex surface (such as tree bark or rough concrete) that takes on lighting detail in addition to the usual detailed coloring. Bump mapping has become popular in video games, as graphics hardware has become powerful enough to accommodate it in real-time. The way that samples (e.g. when viewed as pixels on the screen) are calculated from the texels (texture pixels) is governed by texture filtering. The cheapest method is to use the nearest-neighbour interpolation, but bilinear interpolation or trilinear interpolation between mipmaps are two commonly used alternatives which reduce aliasing or jaggies. In the event of a texture coordinate being outside the texture, it is either clamped or wrapped. Anisotropic filtering better eliminates directional artefacts when viewing textures from oblique viewing angles. Texture streaming is a means of using data streams for textures, where each texture is available in two or more different resolutions, as to determine which texture should be loaded into memory and used based on draw distance from the viewer and how much memory is available for textures. Texture streaming allows a rendering engine to use low resolution textures for objects far away from the viewer's camera, and resolve those into more detailed textures, read from a data source, as the point of view nears the objects. As an optimization, it is possible to render detail from a complex, high-resolution model or expensive process (such as global illumination) into a surface texture (possibly on a low-resolution model). This technique is called baking (or render mapping) and is most commonly used for light maps, but may also be used to generate normal maps and displacement maps. Some computer games (e.g. Messiah) have used this technique. The original Quake software engine used on-the-fly baking to combine light maps and colour maps in a process called surface caching. Baking can be used as a form of level of detail generation, where a complex scene with many different elements and materials may be approximated by a single element with a single texture, which is then algorithmically reduced for lower rendering cost and fewer drawcalls. It is also used to take high-detail models from 3D sculpting software and point cloud scanning and approximate them with meshes more suitable for realtime rendering. Rasterisation algorithms Various techniques have evolved in software and hardware implementations. Each offers different trade-offs in precision, versatility, and performance. Affine texture mapping linearly interpolates texture coordinates across a surface, making it the fastest form of texture mapping. Some software and hardware (such as the original PlayStation) project vertices in 3D space onto the screen during rendering and linearly interpolate the texture coordinates in screen space between them. This may be done by incrementing fixed-point UV coordinates or by an incremental error algorithm akin to Bresenham's line algorithm. In contrast to perpendicular polygons, this leads to noticeable distortion with perspective transformations (as shown in the figure: the checker box texture appears bent), especially as primitives near the camera. This distortion can be reduced by subdividing polygons into smaller polygons. Using quad primitives for rectangular objects can look less incorrect than if those rectangles were split into triangles. However, since interpolating four points adds complexity to the rasterization, most early implementations preferred triangles only. Some hardware, such as the forward texture mapping used by the Nvidia NV1, offered efficient quad primitives. With perspective correction, triangles become equivalent to quad primitives and this advantage disappears. For rectangular objects that are at right angles to the viewer (like floors and walls), the perspective only needs to be corrected in one direction across the screen rather than both. The correct perspective mapping can be calculated at the left and right edges of the floor. Affine linear interpolation across that horizontal span will look correct because every pixel along that line is the same distance from the viewer. Perspective correct texturing accounts for the vertices' positions in 3D space rather than simply interpolating coordinates in 2D screen space. While achieving the correct visual effect, perspective correct texturing is more expensive to calculate. To perform perspective correction of the texture coordinates u {\displaystyle u} and v {\displaystyle v} , with z {\displaystyle z} being the depth component from the viewer's point of view, it is possible to take advantage of the fact that the values 1 z {\displaystyle {\frac {1}{z}}} , u z {\displaystyle {\frac {u}{z}}} , and v z {\displaystyle {\frac {v}{z}}} are linear in screen space across the surface being textured. In contrast, the original z {\displaystyle z} , u {\displaystyle u} , and v {\displaystyle v} , before the division, are not linear across the surface in screen space. It is therefore possible to linearly interpolate these reciprocals across the surface, computing corrected values at each pixel, to produce a perspective correct texture mapping. To do this, the reciprocals at each vertex of the geometry (three points for a triangle) are calculated. Vertex n {\displaystyle n} has reciprocals u n z n {\displaystyle {\frac {u_{n}}{z_{n}}}} , v n z n {\displaystyle {\frac {v_{n}}{z_{n}}}} , and 1 z n {\displaystyle {\frac {1}{z_{n}}}} . Then, linear interpolation can be done on these reciprocals between the n {\displaystyle n} vertices (e.g., using barycentric coordinates), resulting in interpolated values across the surface. At a given point, this yields the interpolated u i , v i {\displaystyle u_{i},v_{i}} and 1 z i {\displaystyle {\frac {1}{z_{i}}}} (reciprocal z i {\displaystyle z_{i}} ). However, as our division by z {\displaystyle z} altered their coordinate system, this u i , v i {\displaystyle u_{i},v_{i}} cannot be used as texture coordinates. To correct back to the u , v {\displaystyle u,v} space, the corrected z {\displaystyle z} is calculated by taking the reciprocal once again: z c o r r e c t = 1 1 z i {\displaystyle z_{correct}={\frac {1}{\frac {1}{z_{i}}}}} . This is then used to correct the u i , v i {\displaystyle u_{i},v_{i}} coordinates: u c o r r e c t = u i ⋅ z i {\displaystyle u_{correct}=u_{i}\cdot z_{i}} and v c o r r e c t = v i ⋅ z i {\displaystyle v_{correct}=v_{i}\cdot z_{i}} . This correction makes it so that the difference from pixel to pixel between texture coordinates is smaller in parts of the polygon that are closer to the viewer (stretching the texture wider) and is larger in parts that are farther away (compressing the texture). Affine texture mapping directly interpolates a texture coordinate u α {\displaystyle u_{\alpha }} between two endpoints u 0 {\displaystyle u_{0}} and u 1 {\displaystyle u_{1}} : u α = ( 1 − α ) u 0 + α u 1 {\displaystyle u_{\alpha }=(1-\alpha )u_{0}+\alpha u_{1}} where 0 ≤ α ≤ 1 {\displaystyle 0\leq \alpha \leq 1} . Perspective correct mapping interpolates after dividing by depth z {\displaystyle z} , then uses its interpolated reciprocal to recover the correct coordinate: u α = ( 1 − α ) u 0 z 0 + α u 1 z 1 ( 1 − α ) 1 z 0 + α 1 z 1 {\displaystyle u_{\alpha }={\frac {(1-\alpha ){\frac {u_{0}}{z_{0}}}+\alpha {\frac {u_{1}}{z_{1}}}}{(1-\alpha ){\frac {1}{z_{0}}}+\alpha {\frac {1}{z_{1}}}}}} 3D graphics hardware typically supports perspective correct texturing. Various techniques have evolved for rendering texture mapped geometry into images with different quality and precision trade-offs, which can be applied to both software and hardware. Classic software texture mappers generally only performed simple texture mapping with one lighting effect at most (typically applied through a lookup table), and the perspective correctness was about 16 times more expensive.[compared to?] The Doom engine restricted the world to vertical walls and horizontal floors and ceilings, with a camera that could only rotate about the vertical axis. This meant the walls would be a constant depth coordinate along a vertical line and the floors and ceilings would have a constant depth along a horizontal line. After performing one perspective correction calculation for the depth, the rest of the line could use fast affine mapping. Some later renderers of this era simulated a small amount of camera pitch with shearing which allowed the appearance of greater freedom while using the same rendering technique. Some engines were able to render texture mapped heightmaps (e.g. Nova Logic's Voxel Space, and the engine for Outcast) via Bresenham-like incremental algorithms, producing the appearance of a texture mapped landscape without the use of traditional geometric primitives. Every triangle can be further subdivided into groups of about 16 pixels in order to achieve two goals: keeping the arithmetic mill busy at all times and producing faster arithmetic results.[vague] For perspective texture mapping without hardware support, a triangle is broken down into smaller triangles for rendering and affine mapping is used on them. The reason this technique works is that the distortion of affine mapping becomes much less noticeable on smaller polygons. The Sony PlayStation made extensive use of this because it only supported affine mapping in hardware and had a relatively high triangle throughput compared to its peers. Software renderers generally prefer screen subdivision because it has less overhead. Additionally, they try to do linear interpolation along a line of pixels to simplify the set-up (compared to 2D affine interpolation), thus lessening the overhead further. Another reason is that affine texture mapping does not fit into the low number of CPU registers of the x86 CPU; the 68000 and RISC processors are much more suited for that approach. A different approach was taken for Quake, which would calculate perspective correct coordinates only once every 16 pixels of a scanline and linearly interpolate between them, effectively running at the speed of linear interpolation because the perspective correct calculation runs in parallel on the co-processor. As the polygons are rendered independently, it may be possible to switch between spans and columns or diagonal directions depending on the orientation of the polygon normal to achieve a more constant z, but the effort seems not to be worth it.[original research?] One other technique is to approximate the perspective with a faster calculation, such as a polynomial. A second uses the 1 z i {\textstyle {\frac {1}{z_{i}}}} value of the last two drawn pixels to linearly extrapolate the next value. For the latter, the division is then done starting from those values so that all that has to be divided is a small remainder. However, the amount of bookkeeping needed makes this technique too slow on most systems.[citation needed] A third technique, used by the Build Engine (used, most notably, in Duke Nukem 3D), builds on the constant distance trick used by the Doom engine by finding and rendering along the line of constant distance for arbitrary polygons. Texture mapping hardware was originally developed for simulation (e.g. as implemented in the Evans and Sutherland ESIG and Singer-Link Digital Image Generators DIG) and professional graphics workstations (such as Silicon Graphics) and broadcast digital video effects machines such as the Ampex ADO. Texture mapping hardware later appeared in arcade cabinets, consumer video game consoles, and PC video cards in the mid-1990s. In flight simulations, texture mapping provided important motion and altitude cues necessary for pilot training not available on untextured surfaces. Additionally, texture mapping was implemented so that real-time processing of prefiltered texture patterns stored in memory could be accessed by the video processor in real-time. Modern graphics processing units (GPUs) provide specialised fixed function units called texture samplers, or texture mapping units, to perform texture mapping, usually with trilinear filtering or better multi-tap anisotropic filtering and hardware for decoding specific formats such as DXTn. As of 2016, texture mapping hardware is ubiquitous as most SOCs contain a suitable GPU. Some hardware implementations combine texture mapping with hidden-surface determination in tile-based deferred rendering or scanline rendering; such systems only fetch the visible texels at the expense of using greater workspace for transformed vertices. Most systems have settled on the z-buffering approach, which can still reduce the texture mapping workload with front-to-back sorting. On earlier graphics hardware, there were two competing paradigms of how to deliver a texture to the screen: Of these methods, inverse texture mapping has become standard in modern hardware. With this method, a pixel on the screen is mapped to a point on the texture. Each vertex of a rendering primitive is projected to a point on the screen, and each of these points is mapped to a u,v texel coordinate on the texture. A rasterizer will interpolate between these points to fill in each pixel covered by the primitive. The primary advantage of this method is that each pixel covered by a primitive will be traversed exactly once. Once a primitive's vertices are transformed, the amount of remaining work scales directly with how many pixels it covers on the screen. The main disadvantage is that the memory access pattern in the texture space will not be linear if the texture is at an angle to the screen. This disadvantage is often addressed by texture caching techniques, such as the swizzled texture memory arrangement. The linear interpolation can be used directly for simple and efficient affine texture mapping, but can also be adapted for perspective correctness. Forward texture mapping maps each texel of the texture to a pixel on the screen. After transforming a rectangular primitive to a place on the screen, a forward texture mapping renderer iterates through each texel on the texture, splatting each one onto a pixel of the frame buffer. This was used by some hardware, such as the 3DO, the Sega Saturn and the NV1. The primary advantage is that the texture will be accessed in a simple linear order, allowing very efficient caching of the texture data. However, this benefit is also its disadvantage: as a primitive gets smaller on screen, it still has to iterate over every texel in the texture, causing many pixels to be overdrawn redundantly. This method is also well suited for rendering quad primitives rather than reducing them to triangles, which provided an advantage when perspective correct texturing was not available in hardware. This is because the affine distortion of a quad looks less incorrect than the same quad split into two triangles (see the § Affine texture mapping section above). The NV1 hardware also allowed a quadratic interpolation mode to provide an even better approximation of perspective correctness. UV mapping became an important technique for 3D modelling and assisted in clipping the texture correctly when the primitive went past the edge of the screen, but existing hardware did not provide effective implementations of this. These shortcomings could have been addressed with further development, but GPU design has mostly shifted toward using the inverse mapping technique. Applications Beyond 3D rendering, the availability of texture mapping hardware has inspired its use for accelerating other tasks: It is possible to use texture mapping hardware to accelerate both the reconstruction of voxel data sets from tomographic scans, and to visualize the results. Many user interfaces use texture mapping to accelerate animated transitions of screen elements, e.g. Exposé in Mac OS X. See also References Software External links |
======================================== |
[SOURCE: https://en.wikipedia.org/wiki/Spherical_coordinates] | [TOKENS: 10927] |
Contents Spherical coordinate system In mathematics, a spherical coordinate system specifies a given point in three-dimensional space by using a distance and two angles as its three coordinates. These are (See graphic regarding the "physics convention".) Once the radius is fixed, the three coordinates (r, θ, φ), known as a 3-tuple, provide a coordinate system on a sphere, typically called the spherical polar coordinates. The plane passing through the origin and perpendicular to the polar axis (where the polar angle is a right angle) is called the reference plane (sometimes fundamental plane). Terminology The radial distance from the fixed point of origin is also called the radius, or radial line, or radial coordinate. The polar angle may be called inclination angle, zenith angle, normal angle, or the colatitude. The user may choose to replace the inclination angle by its complement, the elevation angle (or altitude angle), measured upward between the reference plane and the radial line—i.e., from the reference plane upward (towards to the positive z-axis) to the radial line. The depression angle is the negative of the elevation angle. (See graphic re the "physics convention"—not "mathematics convention".) Both the use of symbols and the naming order of tuple coordinates differ among the several sources and disciplines. This article will use the ISO convention frequently encountered in physics, where the naming tuple gives the order as: radial distance, polar angle, azimuthal angle, or ( r , θ , φ ) {\displaystyle (r,\theta ,\varphi )} . (See graphic re the "physics convention".) In contrast, the conventions in many mathematics books and texts give the naming order differently as: radial distance, "azimuthal angle", "polar angle", and ( ρ , θ , φ ) {\displaystyle (\rho ,\theta ,\varphi )} or ( r , θ , φ ) {\displaystyle (r,\theta ,\varphi )} —which switches the uses and meanings of symbols θ and φ. Other conventions may also be used, such as r for a radius from the z-axis that is not from the point of origin. Particular care must be taken to check the meaning of the symbols. According to the conventions of geographical coordinate systems, positions are measured by latitude, longitude, and height (altitude). There are a number of celestial coordinate systems based on different fundamental planes and with different terms for the various coordinates. The spherical coordinate systems used in mathematics normally use radians rather than degrees; (note 90 degrees equals π⁄2 radians). And these systems of the mathematics convention may measure the azimuthal angle counterclockwise (i.e., from the south direction x-axis, or 180°, towards the east direction y-axis, or +90°)—rather than measure clockwise (i.e., from the north direction x-axis, or 0°, towards the east direction y-axis, or +90°), as done in the horizontal coordinate system. (See graphic re "mathematics convention".) The spherical coordinate system of the physics convention can be seen as a generalization of the polar coordinate system in three-dimensional space. It can be further extended to higher-dimensional spaces, and is then referred to as a hyperspherical coordinate system. Definition To define a spherical coordinate system, one must designate an origin point in space, O, and two orthogonal directions: the zenith reference direction and the azimuth reference direction. These choices determine a reference plane that is typically defined as containing the point of origin and the x– and y–axes, either of which may be designated as the azimuth reference direction. The reference plane is perpendicular (orthogonal) to the zenith direction, and typically is designated "horizontal" to the zenith direction's "vertical". The spherical coordinates of a point P then are defined as follows: The sign of the azimuth is determined by designating the rotation that is the positive sense of turning about the zenith. This choice is arbitrary, and is part of the coordinate system definition. (If the inclination is either zero or 180 degrees (= π radians), the azimuth is arbitrary. If the radius is zero, both azimuth and inclination are arbitrary.) The elevation is the signed angle from the x-y reference plane to the radial line segment OP, where positive angles are designated as upward, towards the zenith reference. Elevation is 90 degrees (= π/2 radians) minus inclination. Thus, if the inclination is 60 degrees (= π/3 radians), then the elevation is 30 degrees (= π/6 radians). In linear algebra, the vector from the origin O to the point P is often called the position vector of P. Several different conventions exist for representing spherical coordinates and prescribing the naming order of their symbols. The 3-tuple number set ( r , θ , φ ) {\displaystyle (r,\theta ,\varphi )} denotes radial distance, the polar angle—"inclination", or as the alternative, "elevation"—and the azimuthal angle. It is the common practice within the physics convention, as specified by ISO standard 80000-2:2019, and earlier in ISO 31-11 (1992). As stated above, this article describes the ISO "physics convention"—unless otherwise noted. However, some authors (including mathematicians) use the symbol ρ (rho) for radius, or radial distance, φ for inclination (or elevation) and θ for azimuth—while others keep the use of r for the radius; all which "provides a logical extension of the usual polar coordinates notation". As to order, some authors list the azimuth before the inclination (or the elevation) angle. Some combinations of these choices result in a left-handed coordinate system. The standard "physics convention" 3-tuple set ( r , θ , φ ) {\displaystyle (r,\theta ,\varphi )} conflicts with the usual notation for two-dimensional polar coordinates and three-dimensional cylindrical coordinates, where θ is often used for the azimuth. Angles are typically measured in degrees (°) or in radians (rad), where 360° = 2π rad. The use of degrees is most common in geography, astronomy, and engineering, where radians are commonly used in mathematics and theoretical physics. The unit for radial distance is usually determined by the context, as occurs in applications of the 'unit sphere', see applications. When the system is used to designate physical three-space, it is customary to assign positive to azimuth angles measured in the counterclockwise sense from the reference direction on the reference plane—as seen from the "zenith" side of the plane. This convention is used in particular for geographical coordinates, where the "zenith" direction is north and the positive azimuth (longitude) angles are measured eastwards from some prime meridian. Note: Easting (E), Northing (N), Upwardness (U). In the case of (U, S, E) the local azimuth angle would be measured counterclockwise from S to E. Any spherical coordinate triplet (or tuple) ( r , θ , φ ) {\displaystyle (r,\theta ,\varphi )} specifies a single point of three-dimensional space. On the reverse view, any single point has infinitely many equivalent spherical coordinates. That is, the user can add or subtract any number of full turns to the angular measures without changing the angles themselves, and therefore without changing the point. It is convenient in many contexts to use negative radial distances, the convention being ( − r , θ , φ ) {\displaystyle (-r,\theta ,\varphi )} , which is equivalent to ( r , θ + 180 ∘ , φ ) {\displaystyle (r,\theta {+}180^{\circ },\varphi )} or ( r , 90 ∘ − θ , φ + 180 ∘ ) {\displaystyle (r,90^{\circ }{-}\theta ,\varphi {+}180^{\circ })} for any r, θ, and φ. Moreover, ( r , − θ , φ ) {\displaystyle (r,-\theta ,\varphi )} is equivalent to ( r , θ , φ + 180 ∘ ) {\displaystyle (r,\theta ,\varphi {+}180^{\circ })} . When necessary to define a unique set of spherical coordinates for each point, the user must restrict the range, aka interval, of each coordinate. A common choice is: But instead of the interval [0°, 360°), the azimuth φ is typically restricted to the half-open interval (−180°, +180°], or (−π, +π ] radians, which is the standard convention for geographic longitude. For the polar angle θ, the range (interval) for inclination is [0°, 180°], which is equivalent to elevation range (interval) [−90°, +90°]. In geography, the latitude is the elevation. Even with these restrictions, if the polar angle (inclination) is 0° or 180°—elevation is −90° or +90°—then the azimuth angle is arbitrary; and if r is zero, both azimuth and polar angles are arbitrary. To define the coordinates as unique, the user can assert the convention that (in these cases) the arbitrary coordinates are set to zero. To plot any dot from its spherical coordinates (r, θ, φ), where θ is inclination, the user would: move r units from the origin in the zenith reference direction (z-axis); then rotate by the amount of the azimuth angle (φ) about the origin from the designated azimuth reference direction, (i.e., either the x- or y-axis, see Definition, above); and then rotate from the z-axis by the amount of the θ angle. Applications Just as the two-dimensional Cartesian coordinate system is useful—has a wide set of applications—on a planar surface, a two-dimensional spherical coordinate system is useful on the surface of a sphere. For example, one sphere that is described in Cartesian coordinates with the equation x2 + y2 + z2 = c2 can be described in spherical coordinates by the simple equation r = c. (In this system—shown here in the mathematics convention—the sphere is adapted as a unit sphere, where the radius is set to unity and then can generally be ignored, see graphic.) This (unit sphere) simplification is also useful when dealing with objects such as rotational matrices. Spherical coordinates are also useful in analyzing systems that have some degree of symmetry about a point, including: volume integrals inside a sphere; the potential energy field surrounding a concentrated mass or charge; or global weather simulation in a planet's atmosphere. Three dimensional modeling of loudspeaker output patterns can be used to predict their performance. A number of polar plots are required, taken at a wide selection of frequencies, as the pattern changes greatly with frequency. Polar plots help to show that many loudspeakers tend toward omnidirectionality at lower frequencies. An important application of spherical coordinates provides for the separation of variables in two partial differential equations—the Laplace and the Helmholtz equations—that arise in many physical problems. The angular portions of the solutions to such equations take the form of spherical harmonics. Another application is ergonomic design, where r is the arm length of a stationary person and the angles describe the direction of the arm as it reaches out. The spherical coordinate system is also commonly used in 3D game development to rotate the camera around the player's position Instead of inclination, the geographic coordinate system uses elevation angle (or latitude), in the range (aka domain) −90° ≤ φ ≤ 90° and rotated north from the equator plane. Latitude (i.e., the angle of latitude) may be either geocentric latitude, measured (rotated) from the Earth's center—and designated variously by ψ, q, φ′, φc, φg—or geodetic latitude, measured (rotated) from the observer's local vertical, and typically designated φ. The polar angle (inclination), which is 90° minus the latitude and ranges from 0 to 180°, is called colatitude in geography. The azimuth angle (or longitude) of a given position on Earth, commonly denoted by λ, is measured in degrees east or west from some conventional reference meridian (most commonly the IERS Reference Meridian); thus its domain (or range) is −180° ≤ λ ≤ 180° and a given reading is typically designated "East" or "West". For positions on the Earth or other solid celestial body, the reference plane is usually taken to be the plane perpendicular to the axis of rotation. Instead of the radial distance r geographers commonly use altitude above or below some local reference surface (vertical datum), which, for example, may be the mean sea level. When needed, the radial distance can be computed from the altitude by adding the radius of Earth, which is approximately 6,360 ± 11 km (3,952 ± 7 miles). However, modern geographical coordinate systems are quite complex, and the positions implied by these simple formulae may be inaccurate by several kilometers. The precise standard meanings of latitude, longitude and altitude are currently defined by the World Geodetic System (WGS), and take into account the flattening of the Earth at the poles (about 21 km or 13 miles) and many other details. Planetary coordinate systems use formulations analogous to the geographic coordinate system. A series of astronomical coordinate systems are used to measure the elevation angle from several fundamental planes. These reference planes include: the observer's horizon, the galactic equator (defined by the rotation of the Milky Way), the celestial equator (defined by Earth's rotation), the plane of the ecliptic (defined by Earth's orbit around the Sun), and the plane of the earth terminator (normal to the instantaneous direction to the Sun). Coordinate system conversions As the spherical coordinate system is only one of many three-dimensional coordinate systems, there exist equations for converting coordinates between the spherical coordinate system and others. The spherical coordinates of a point in the ISO convention (i.e. for physics: radius r, inclination θ, azimuth φ) can be obtained from its Cartesian coordinates (x, y, z) by the formulae r = x 2 + y 2 + z 2 θ = arccos z x 2 + y 2 + z 2 = arccos z r = { arctan x 2 + y 2 z if z > 0 π + arctan x 2 + y 2 z if z < 0 + π 2 if z = 0 and x 2 + y 2 ≠ 0 undefined if x = y = z = 0 φ = sgn ( y ) arccos x x 2 + y 2 = { arctan ( y x ) if x > 0 , arctan ( y x ) + π if x < 0 and y ≥ 0 , arctan ( y x ) − π if x < 0 and y < 0 , + π 2 if x = 0 and y > 0 , − π 2 if x = 0 and y < 0 , undefined if x = 0 and y = 0. {\displaystyle {\begin{aligned}r&={\sqrt {x^{2}+y^{2}+z^{2}}}\\\theta &=\arccos {\frac {z}{\sqrt {x^{2}+y^{2}+z^{2}}}}=\arccos {\frac {z}{r}}={\begin{cases}\arctan {\frac {\sqrt {x^{2}+y^{2}}}{z}}&{\text{if }}z>0\\\pi +\arctan {\frac {\sqrt {x^{2}+y^{2}}}{z}}&{\text{if }}z<0\\+{\frac {\pi }{2}}&{\text{if }}z=0{\text{ and }}{\sqrt {x^{2}+y^{2}}}\neq 0\\{\text{undefined}}&{\text{if }}x=y=z=0\\\end{cases}}\\\varphi &=\operatorname {sgn}(y)\arccos {\frac {x}{\sqrt {x^{2}+y^{2}}}}={\begin{cases}\arctan({\frac {y}{x}})&{\text{if }}x>0,\\\arctan({\frac {y}{x}})+\pi &{\text{if }}x<0{\text{ and }}y\geq 0,\\\arctan({\frac {y}{x}})-\pi &{\text{if }}x<0{\text{ and }}y<0,\\+{\frac {\pi }{2}}&{\text{if }}x=0{\text{ and }}y>0,\\-{\frac {\pi }{2}}&{\text{if }}x=0{\text{ and }}y<0,\\{\text{undefined}}&{\text{if }}x=0{\text{ and }}y=0.\end{cases}}\end{aligned}}} where sgn(0) = 1. The inverse tangent denoted in φ = arctan y/x must be suitably defined, taking into account the correct quadrant of (x, y), as done in the equations above. See the article on atan2. Alternatively, the conversion can be considered as two sequential rectangular to polar conversions: the first in the Cartesian xy plane from (x, y) to (R, φ), where R is the projection of r onto the xy-plane, and the second in the Cartesian zR-plane from (z, R) to (r, θ). The correct quadrants for φ and θ are implied by the correctness of the planar rectangular to polar conversions. These formulae assume that the two systems have the same origin, that the spherical reference plane is the Cartesian xy plane, that θ is inclination from the z direction, and that the azimuth angles are measured from the Cartesian x axis (so that the y axis has φ = +90°). If θ measures elevation from the reference plane instead of inclination from the zenith the arccos above becomes an arcsin, and the cos θ and sin θ below become switched. Conversely, the Cartesian coordinates may be retrieved from the spherical coordinates (radius r, inclination θ, azimuth φ), where r ∈ [0, ∞), θ ∈ [0, π], φ ∈ [0, 2π), by x = r sin θ cos φ , y = r sin θ sin φ , z = r cos θ . {\displaystyle {\begin{aligned}x&=r\sin \theta \,\cos \varphi ,\\y&=r\sin \theta \,\sin \varphi ,\\z&=r\cos \theta .\end{aligned}}} Cylindrical coordinates (axial radius ρ, azimuth φ, elevation z) may be converted into spherical coordinates (central radius r, inclination θ, azimuth φ), by the formulas r = ρ 2 + z 2 , θ = arctan ρ z = arccos z ρ 2 + z 2 , φ = φ . {\displaystyle {\begin{aligned}r&={\sqrt {\rho ^{2}+z^{2}}},\\\theta &=\arctan {\frac {\rho }{z}}=\arccos {\frac {z}{\sqrt {\rho ^{2}+z^{2}}}},\\\varphi &=\varphi .\end{aligned}}} Conversely, the spherical coordinates may be converted into cylindrical coordinates by the formulae ρ = r sin θ , φ = φ , z = r cos θ . {\displaystyle {\begin{aligned}\rho &=r\sin \theta ,\\\varphi &=\varphi ,\\z&=r\cos \theta .\end{aligned}}} These formulae assume that the two systems have the same origin and same reference plane, measure the azimuth angle φ in the same senses from the same axis, and that the spherical angle θ is inclination from the cylindrical z axis. Ellipsoidal coordinates It is also possible to deal with ellipsoids in Cartesian coordinates by using a modified version of the spherical coordinates. Let P be an ellipsoid specified by the level set a x 2 + b y 2 + c z 2 = d . {\displaystyle ax^{2}+by^{2}+cz^{2}=d.} The modified spherical coordinates of a point in P in the ISO convention (i.e. for physics: radius r, inclination θ, azimuth φ) can be obtained from its Cartesian coordinates (x, y, z) by the formulae x = 1 a r sin θ cos φ , y = 1 b r sin θ sin φ , z = 1 c r cos θ , r 2 = a x 2 + b y 2 + c z 2 . {\displaystyle {\begin{aligned}x&={\frac {1}{\sqrt {a}}}r\sin \theta \,\cos \varphi ,\\y&={\frac {1}{\sqrt {b}}}r\sin \theta \,\sin \varphi ,\\z&={\frac {1}{\sqrt {c}}}r\cos \theta ,\\r^{2}&=ax^{2}+by^{2}+cz^{2}.\end{aligned}}} An infinitesimal volume element is given by d V = | ∂ ( x , y , z ) ∂ ( r , θ , φ ) | d r d θ d φ = 1 a b c r 2 sin θ d r d θ d φ = 1 a b c r 2 d r d Ω . {\displaystyle \mathrm {d} V=\left|{\frac {\partial (x,y,z)}{\partial (r,\theta ,\varphi )}}\right|\,dr\,d\theta \,d\varphi ={\frac {1}{\sqrt {abc}}}r^{2}\sin \theta \,\mathrm {d} r\,\mathrm {d} \theta \,\mathrm {d} \varphi ={\frac {1}{\sqrt {abc}}}r^{2}\,\mathrm {d} r\,\mathrm {d} \Omega .} The square-root factor comes from the property of the determinant that allows a constant to be pulled out from a column: | k a b c k d e f k g h i | = k | a b c d e f g h i | . {\displaystyle {\begin{vmatrix}ka&b&c\\kd&e&f\\kg&h&i\end{vmatrix}}=k{\begin{vmatrix}a&b&c\\d&e&f\\g&h&i\end{vmatrix}}.} Integration and differentiation in spherical coordinates The following equations (Iyanaga 1977) assume that the colatitude θ is the inclination from the positive z axis, as in the physics convention discussed. The line element for an infinitesimal displacement from (r, θ, φ) to (r + dr, θ + dθ, φ + dφ) is d r = d r r ^ + r d θ θ ^ + r sin θ d φ φ ^ , {\displaystyle \mathrm {d} \mathbf {r} =\mathrm {d} r\,{\hat {\mathbf {r} }}+r\,\mathrm {d} \theta \,{\hat {\boldsymbol {\theta }}}+r\sin {\theta }\,\mathrm {d} \varphi \,\mathbf {\hat {\boldsymbol {\varphi }}} ,} where r ^ = sin θ cos φ x ^ + sin θ sin φ y ^ + cos θ z ^ , θ ^ = cos θ cos φ x ^ + cos θ sin φ y ^ − sin θ z ^ , φ ^ = − sin φ x ^ + cos φ y ^ {\displaystyle {\begin{aligned}{\hat {\mathbf {r} }}&=\sin \theta \cos \varphi \,{\hat {\mathbf {x} }}+\sin \theta \sin \varphi \,{\hat {\mathbf {y} }}+\cos \theta \,{\hat {\mathbf {z} }},\\{\hat {\boldsymbol {\theta }}}&=\cos \theta \cos \varphi \,{\hat {\mathbf {x} }}+\cos \theta \sin \varphi \,{\hat {\mathbf {y} }}-\sin \theta \,{\hat {\mathbf {z} }},\\{\hat {\boldsymbol {\varphi }}}&=-\sin \varphi \,{\hat {\mathbf {x} }}+\cos \varphi \,{\hat {\mathbf {y} }}\end{aligned}}} are the local orthogonal unit vectors in the directions of increasing r, θ, and φ, respectively, and x̂, ŷ, and ẑ are the unit vectors in Cartesian coordinates. The linear transformation to this right-handed coordinate triplet is a rotation matrix, R = ( sin θ cos φ sin θ sin φ − cos θ cos θ cos φ cos θ sin φ − sin θ − sin φ cos φ − 0 ) . {\displaystyle R={\begin{pmatrix}\sin \theta \cos \varphi &\sin \theta \sin \varphi &{\hphantom {-}}\cos \theta \\\cos \theta \cos \varphi &\cos \theta \sin \varphi &-\sin \theta \\-\sin \varphi &\cos \varphi &{\hphantom {-}}0\end{pmatrix}}.} This gives the transformation from the Cartesian to the spherical, the other way around is given by its inverse. Note: the matrix is an orthogonal matrix, that is, its inverse is simply its transpose. The Cartesian unit vectors are thus related to the spherical unit vectors by: [ x ^ y ^ z ^ ] = [ sin θ cos φ cos θ cos φ − sin φ sin θ sin φ cos θ sin φ − cos φ cos θ − sin θ − 0 ] [ r ^ θ ^ φ ^ ] {\displaystyle {\begin{bmatrix}\mathbf {\hat {x}} \\\mathbf {\hat {y}} \\\mathbf {\hat {z}} \end{bmatrix}}={\begin{bmatrix}\sin \theta \cos \varphi &\cos \theta \cos \varphi &-\sin \varphi \\\sin \theta \sin \varphi &\cos \theta \sin \varphi &{\hphantom {-}}\cos \varphi \\\cos \theta &-\sin \theta &{\hphantom {-}}0\end{bmatrix}}{\begin{bmatrix}{\boldsymbol {\hat {r}}}\\{\boldsymbol {\hat {\theta }}}\\{\boldsymbol {\hat {\varphi }}}\end{bmatrix}}} The general form of the formula to prove the differential line element, is d r = ∑ i ∂ r ∂ x i d x i = ∑ i | ∂ r ∂ x i | ∂ r ∂ x i | ∂ r ∂ x i | d x i = ∑ i | ∂ r ∂ x i | d x i x ^ i , {\displaystyle \mathrm {d} \mathbf {r} =\sum _{i}{\frac {\partial \mathbf {r} }{\partial x_{i}}}\,\mathrm {d} x_{i}=\sum _{i}\left|{\frac {\partial \mathbf {r} }{\partial x_{i}}}\right|{\frac {\frac {\partial \mathbf {r} }{\partial x_{i}}}{\left|{\frac {\partial \mathbf {r} }{\partial x_{i}}}\right|}}\,\mathrm {d} x_{i}=\sum _{i}\left|{\frac {\partial \mathbf {r} }{\partial x_{i}}}\right|\,\mathrm {d} x_{i}\,{\hat {\boldsymbol {x}}}_{i},} that is, the change in r {\displaystyle \mathbf {r} } is decomposed into individual changes corresponding to changes in the individual coordinates. To apply this to the present case, one needs to calculate how r {\displaystyle \mathbf {r} } changes with each of the coordinates. In the conventions used, r = [ r sin θ cos φ r sin θ sin φ r cos θ ] , x 1 = r , x 2 = θ , x 3 = φ . {\displaystyle \mathbf {r} ={\begin{bmatrix}r\sin \theta \,\cos \varphi \\r\sin \theta \,\sin \varphi \\r\cos \theta \end{bmatrix}},x_{1}=r,x_{2}=\theta ,x_{3}=\varphi .} Thus, ∂ r ∂ r = [ sin θ cos φ sin θ sin φ cos θ ] = r ^ , ∂ r ∂ θ = [ r cos θ cos φ r cos θ sin φ − r sin θ ] = r θ ^ , ∂ r ∂ φ = [ − r sin θ sin φ − r sin θ cos φ 0 ] = r sin θ φ ^ . {\displaystyle {\frac {\partial \mathbf {r} }{\partial r}}={\begin{bmatrix}\sin \theta \,\cos \varphi \\\sin \theta \,\sin \varphi \\\cos \theta \end{bmatrix}}=\mathbf {\hat {r}} ,\quad {\frac {\partial \mathbf {r} }{\partial \theta }}={\begin{bmatrix}r\cos \theta \,\cos \varphi \\r\cos \theta \,\sin \varphi \\-r\sin \theta \end{bmatrix}}=r\,{\hat {\boldsymbol {\theta }}},\quad {\frac {\partial \mathbf {r} }{\partial \varphi }}={\begin{bmatrix}-r\sin \theta \,\sin \varphi \\{\hphantom {-}}r\sin \theta \,\cos \varphi \\0\end{bmatrix}}=r\sin \theta \,\mathbf {\hat {\boldsymbol {\varphi }}} .} The desired coefficients are the magnitudes of these vectors: | ∂ r ∂ r | = 1 , | ∂ r ∂ θ | = r , | ∂ r ∂ φ | = r sin θ . {\displaystyle \left|{\frac {\partial \mathbf {r} }{\partial r}}\right|=1,\quad \left|{\frac {\partial \mathbf {r} }{\partial \theta }}\right|=r,\quad \left|{\frac {\partial \mathbf {r} }{\partial \varphi }}\right|=r\sin \theta .} The surface element spanning from θ to θ + dθ and φ to φ + dφ on a spherical surface at (constant) radius r is then d S r = ‖ ∂ r ∂ θ × ∂ r ∂ φ ‖ d θ d φ = | r θ ^ × r sin θ φ ^ | d θ d φ = r 2 sin θ d θ d φ . {\displaystyle \mathrm {d} S_{r}=\left\|{\frac {\partial {\mathbf {r} }}{\partial \theta }}\times {\frac {\partial {\mathbf {r} }}{\partial \varphi }}\right\|\mathrm {d} \theta \,\mathrm {d} \varphi =\left|r{\hat {\boldsymbol {\theta }}}\times r\sin \theta {\boldsymbol {\hat {\varphi }}}\right|\mathrm {d} \theta \,\mathrm {d} \varphi =r^{2}\sin \theta \,\mathrm {d} \theta \,\mathrm {d} \varphi ~.} Thus the differential solid angle is d Ω = d S r r 2 = sin θ d θ d φ . {\displaystyle \mathrm {d} \Omega ={\frac {\mathrm {d} S_{r}}{r^{2}}}=\sin \theta \,\mathrm {d} \theta \,\mathrm {d} \varphi .} The surface element in a surface of polar angle θ constant (a cone with vertex at the origin) is d S θ = r sin θ d φ d r . {\displaystyle \mathrm {d} S_{\theta }=r\sin \theta \,\mathrm {d} \varphi \,\mathrm {d} r.} The surface element in a surface of azimuth φ constant (a vertical half-plane) is d S φ = r d r d θ . {\displaystyle \mathrm {d} S_{\varphi }=r\,\mathrm {d} r\,\mathrm {d} \theta .} The volume element spanning from r to r + dr, θ to θ + dθ, and φ to φ + dφ is specified by the determinant of the Jacobian matrix of partial derivatives, J = ∂ ( x , y , z ) ∂ ( r , θ , φ ) = ( sin θ cos φ r cos θ cos φ − r sin θ sin φ sin θ sin φ r cos θ sin φ − r sin θ cos φ cos θ − r sin θ − 0 ) , {\displaystyle J={\frac {\partial (x,y,z)}{\partial (r,\theta ,\varphi )}}={\begin{pmatrix}\sin \theta \cos \varphi &r\cos \theta \cos \varphi &-r\sin \theta \sin \varphi \\\sin \theta \sin \varphi &r\cos \theta \sin \varphi &{\hphantom {-}}r\sin \theta \cos \varphi \\\cos \theta &-r\sin \theta &{\hphantom {-}}0\end{pmatrix}},} namely d V = | ∂ ( x , y , z ) ∂ ( r , θ , φ ) | d r d θ d φ = r 2 sin θ d r d θ d φ = r 2 d r d Ω . {\displaystyle \mathrm {d} V=\left|{\frac {\partial (x,y,z)}{\partial (r,\theta ,\varphi )}}\right|\,\mathrm {d} r\,\mathrm {d} \theta \,\mathrm {d} \varphi =r^{2}\sin \theta \,\mathrm {d} r\,\mathrm {d} \theta \,\mathrm {d} \varphi =r^{2}\,\mathrm {d} r\,\mathrm {d} \Omega ~.} Thus, for example, a function f(r, θ, φ) can be integrated over every point in R3 by the triple integral ∫ 0 2 π ∫ 0 π ∫ 0 ∞ f ( r , θ , φ ) r 2 sin θ d r d θ d φ . {\displaystyle \int \limits _{0}^{2\pi }\int \limits _{0}^{\pi }\int \limits _{0}^{\infty }f(r,\theta ,\varphi )r^{2}\sin \theta \,\mathrm {d} r\,\mathrm {d} \theta \,\mathrm {d} \varphi ~.} The del operator in this system leads to the following expressions for the gradient and Laplacian for scalar fields, ∇ f = ∂ f ∂ r r ^ + 1 r ∂ f ∂ θ θ ^ + 1 r sin θ ∂ f ∂ φ φ ^ , ∇ 2 f = 1 r 2 ∂ ∂ r ( r 2 ∂ f ∂ r ) + 1 r 2 sin θ ∂ ∂ θ ( sin θ ∂ f ∂ θ ) + 1 r 2 sin 2 θ ∂ 2 f ∂ φ 2 = ( ∂ 2 ∂ r 2 + 2 r ∂ ∂ r ) f + 1 r 2 sin θ ∂ ∂ θ ( sin θ ∂ ∂ θ ) f + 1 r 2 sin 2 θ ∂ 2 ∂ φ 2 f , {\displaystyle {\begin{aligned}\nabla f&={\partial f \over \partial r}{\hat {\mathbf {r} }}+{1 \over r}{\partial f \over \partial \theta }{\hat {\boldsymbol {\theta }}}+{1 \over r\sin \theta }{\partial f \over \partial \varphi }{\hat {\boldsymbol {\varphi }}},\\[8pt]\nabla ^{2}f&={1 \over r^{2}}{\partial \over \partial r}\left(r^{2}{\partial f \over \partial r}\right)+{1 \over r^{2}\sin \theta }{\partial \over \partial \theta }\left(\sin \theta {\partial f \over \partial \theta }\right)+{1 \over r^{2}\sin ^{2}\theta }{\partial ^{2}f \over \partial \varphi ^{2}}\\[8pt]&=\left({\frac {\partial ^{2}}{\partial r^{2}}}+{\frac {2}{r}}{\frac {\partial }{\partial r}}\right)f+{1 \over r^{2}\sin \theta }{\partial \over \partial \theta }\left(\sin \theta {\frac {\partial }{\partial \theta }}\right)f+{\frac {1}{r^{2}\sin ^{2}\theta }}{\frac {\partial ^{2}}{\partial \varphi ^{2}}}f~,\\[8pt]\end{aligned}}} And it leads to the following expressions for the divergence and curl of vector fields, ∇ ⋅ A = 1 r 2 ∂ ∂ r ( r 2 A r ) + 1 r sin θ ∂ ∂ θ ( sin θ A θ ) + 1 r sin θ ∂ A φ ∂ φ , {\displaystyle \nabla \cdot \mathbf {A} ={\frac {1}{r^{2}}}{\partial \over \partial r}\left(r^{2}A_{r}\right)+{\frac {1}{r\sin \theta }}{\partial \over \partial \theta }\left(\sin \theta A_{\theta }\right)+{\frac {1}{r\sin \theta }}{\partial A_{\varphi } \over \partial \varphi },} ∇ × A = 1 r sin θ [ ∂ ∂ θ ( A φ sin θ ) − ∂ A θ ∂ φ ] r ^ + 1 r [ 1 sin θ ∂ A r ∂ φ − ∂ ∂ r ( r A φ ) ] θ ^ + 1 r [ ∂ ∂ r ( r A θ ) − ∂ A r ∂ θ ] φ ^ , {\displaystyle {\begin{aligned}\nabla \times \mathbf {A} ={}&{\frac {1}{r\sin \theta }}\left[{\partial \over \partial \theta }\left(A_{\varphi }\sin \theta \right)-{\partial A_{\theta } \over \partial \varphi }\right]{\hat {\mathbf {r} }}\\[4pt]&{}+{\frac {1}{r}}\left[{1 \over \sin \theta }{\partial A_{r} \over \partial \varphi }-{\partial \over \partial r}\left(rA_{\varphi }\right)\right]{\hat {\boldsymbol {\theta }}}\\[4pt]&{}+{\frac {1}{r}}\left[{\partial \over \partial r}\left(rA_{\theta }\right)-{\partial A_{r} \over \partial \theta }\right]{\hat {\boldsymbol {\varphi }}},\end{aligned}}} Further, the inverse Jacobian in Cartesian coordinates is J − 1 = ( x r y r z r x z r 2 x 2 + y 2 y z r 2 x 2 + y 2 − ( x 2 + y 2 ) r 2 x 2 + y 2 − y x 2 + y 2 x x 2 + y 2 0 ) . {\displaystyle J^{-1}={\begin{pmatrix}{\dfrac {x}{r}}&{\dfrac {y}{r}}&{\dfrac {z}{r}}\\\\{\dfrac {xz}{r^{2}{\sqrt {x^{2}+y^{2}}}}}&{\dfrac {yz}{r^{2}{\sqrt {x^{2}+y^{2}}}}}&{\dfrac {-\left(x^{2}+y^{2}\right)}{r^{2}{\sqrt {x^{2}+y^{2}}}}}\\\\{\dfrac {-y}{x^{2}+y^{2}}}&{\dfrac {x}{x^{2}+y^{2}}}&0\end{pmatrix}}.} The metric tensor in the spherical coordinate system is g = J T J {\displaystyle g=J^{T}J} . Distance and angle in spherical coordinates In spherical coordinates, given two points with φ being the azimuthal coordinate r = ( r , θ , φ ) , r ′ = ( r ′ , θ ′ , φ ′ ) {\displaystyle {\begin{aligned}{\mathbf {r} }&=(r,\theta ,\varphi ),\\{\mathbf {r} '}&=(r',\theta ',\varphi ')\end{aligned}}} The distance between the two points can be expressed as D = r 2 + r ′ 2 − 2 r r ′ ( sin θ sin θ ′ cos ( φ − φ ′ ) + cos θ cos θ ′ ) {\displaystyle {\begin{aligned}{\mathbf {D} }&={\sqrt {r^{2}+r'^{2}-2rr'(\sin {\theta }\sin {\theta '}\cos {(\varphi -\varphi ')}+\cos {\theta }\cos {\theta '})}}\end{aligned}}} The angle γ {\displaystyle \gamma } between the two points can be found from their dot product in Cartesian coordinates: cos γ = cos θ cos θ ′ + sin θ sin θ ′ ( cos ϕ cos ϕ ′ + sin ϕ sin ϕ ′ ) {\displaystyle \cos \gamma =\cos \theta \cos \theta '+\sin \theta \sin \theta '(\cos \phi \cos \phi '+\sin \phi \sin \phi ')} which by the angle difference identity for cosine is cos γ = cos θ cos θ ′ + sin θ sin θ ′ cos ( ϕ − ϕ ′ ) {\displaystyle \cos \gamma =\cos \theta \cos \theta '+\sin \theta \sin \theta '\cos(\phi -\phi ')} Kinematics In spherical coordinates, the position of a point or particle (although better written as a triple ( r , θ , φ ) {\displaystyle (r,\theta ,\varphi )} ) can be written as r = r r ^ . {\displaystyle \mathbf {r} =r\mathbf {\hat {r}} .} Its velocity is then v = d r d t = r ˙ r ^ + r θ ˙ θ ^ + r φ ˙ sin θ φ ^ {\displaystyle \mathbf {v} ={\frac {\mathrm {d} \mathbf {r} }{\mathrm {d} t}}={\dot {r}}\mathbf {\hat {r}} +r\,{\dot {\theta }}\,{\hat {\boldsymbol {\theta }}}+r\,{\dot {\varphi }}\sin \theta \,\mathbf {\hat {\boldsymbol {\varphi }}} } and its acceleration is a = d v d t = + ( r ¨ − r θ ˙ 2 − r φ ˙ 2 sin 2 θ ) r ^ + ( r θ ¨ + 2 r ˙ θ ˙ − r φ ˙ 2 sin θ cos θ ) θ ^ + ( r φ ¨ sin θ + 2 r ˙ φ ˙ sin θ + 2 r θ ˙ φ ˙ cos θ ) φ ^ {\displaystyle {\begin{aligned}\mathbf {a} ={}&{\frac {\mathrm {d} \mathbf {v} }{\mathrm {d} t}}\\[1ex]={}&{\hphantom {+}}\;\left({\ddot {r}}-r\,{\dot {\theta }}^{2}-r\,{\dot {\varphi }}^{2}\sin ^{2}\theta \right)\mathbf {\hat {r}} \\&{}+\left(r\,{\ddot {\theta }}+2{\dot {r}}\,{\dot {\theta }}-r\,{\dot {\varphi }}^{2}\sin \theta \cos \theta \right){\hat {\boldsymbol {\theta }}}\\&{}+\left(r{\ddot {\varphi }}\,\sin \theta +2{\dot {r}}\,{\dot {\varphi }}\,\sin \theta +2r\,{\dot {\theta }}\,{\dot {\varphi }}\,\cos \theta \right){\hat {\boldsymbol {\varphi }}}\end{aligned}}} The angular momentum is L = r × p = r × m v = m r 2 ( − φ ˙ sin θ θ ^ + θ ˙ φ ^ ) {\displaystyle \mathbf {L} =\mathbf {r} \times \mathbf {p} =\mathbf {r} \times m\mathbf {v} =mr^{2}\left(-{\dot {\varphi }}\sin \theta \,\mathbf {\hat {\boldsymbol {\theta }}} +{\dot {\theta }}\,{\hat {\boldsymbol {\varphi }}}\right)} Where m {\displaystyle m} is mass. In the case of a constant φ or else θ = π/2, this reduces to vector calculus in polar coordinates. The corresponding angular momentum operator then follows from the phase-space reformulation of the above, L = − i ℏ r × ∇ = i ℏ ( θ ^ sin ( θ ) ∂ ∂ ϕ − ϕ ^ ∂ ∂ θ ) . {\displaystyle \mathbf {L} =-i\hbar ~\mathbf {r} \times \nabla =i\hbar \left({\frac {\hat {\boldsymbol {\theta }}}{\sin(\theta )}}{\frac {\partial }{\partial \phi }}-{\hat {\boldsymbol {\phi }}}{\frac {\partial }{\partial \theta }}\right).} The torque is given as τ = d L d t = r × F = − m ( 2 r r ˙ φ ˙ sin θ + r 2 φ ¨ sin θ + 2 r 2 θ ˙ φ ˙ cos θ ) θ ^ + m ( r 2 θ ¨ + 2 r r ˙ θ ˙ − r 2 φ ˙ 2 sin θ cos θ ) φ ^ {\displaystyle \mathbf {\tau } ={\frac {\mathrm {d} \mathbf {L} }{\mathrm {d} t}}=\mathbf {r} \times \mathbf {F} =-m\left(2r{\dot {r}}{\dot {\varphi }}\sin \theta +r^{2}{\ddot {\varphi }}\sin {\theta }+2r^{2}{\dot {\theta }}{\dot {\varphi }}\cos {\theta }\right){\hat {\boldsymbol {\theta }}}+m\left(r^{2}{\ddot {\theta }}+2r{\dot {r}}{\dot {\theta }}-r^{2}{\dot {\varphi }}^{2}\sin \theta \cos \theta \right){\hat {\boldsymbol {\varphi }}}} The kinetic energy is given as E k = 1 2 m [ ( r ˙ ) 2 + ( r θ ˙ ) 2 + ( r φ ˙ sin θ ) 2 ] {\displaystyle E_{k}={\frac {1}{2}}m\left[\left({\dot {r}}\right)^{2}+\left(r{\dot {\theta }}\right)^{2}+\left(r{\dot {\varphi }}\sin \theta \right)^{2}\right]} See also Notes References Bibliography External links |
======================================== |
[SOURCE: https://en.wikipedia.org/wiki/Screen_space] | [TOKENS: 61] |
Glossary of computer graphics This is a glossary of terms relating to computer graphics. For more general computer hardware terms, see glossary of computer hardware terms. 0–9 A B C D E F G H I K L M N O P Q R S T U V W Z References |
======================================== |
[SOURCE: https://en.wikipedia.org/wiki/Texel_(graphics)] | [TOKENS: 446] |
Contents Texel (graphics) In computer graphics, a texel, texture element, or texture pixel is the fundamental unit of a texture map. Textures are represented by arrays of texels representing the texture space, just as other images are represented by arrays of pixels. Texels can also be described by image regions that are obtained through simple procedures such as thresholding. Voronoi tesselation can be used to define their spatial relationships—divisions are made at the midpoints between the centroids of each texel and the centroids of every surrounding texel for the entire texture. This results in each texel centroid having a Voronoi polygon surrounding it, which consists of all points that are closer to its own texel centroid than any other centroid. Rendering When texturing a 3D surface or surfaces (a process known as texture mapping), the renderer maps texels to appropriate pixels in the geometric fragment (typically a triangle) in the output picture. On modern computers, this operation is accomplished on the graphics processing unit. The texturing process starts with a location in space. The location can be in world space, but typically it is local to a model space so that the texture moves with the model. A projector function is applied to the location to change the location from a three-element vector ( ( x , y , z ) {\displaystyle \left(x,y,z\right)} ) to a two-element ( ( u , v ) {\displaystyle \left(u,v\right)} ) vector with values ranging from zero to one (uv). These values are multiplied by the resolution of the texture to obtain the location of the texel. When a texel is requested that is not on an integer position, texture filtering is applied. When a texel is requested that is outside of the texture, one of two techniques is used: clamping or wrapping. Clamping limits the texel to the texture size, moving it to the nearest edge if it is more than the texture size. Wrapping moves the texel in increments of the texture's size to bring it back into the texture. Wrapping causes a texture to be repeated; clamping causes it to be in one spot only. See also References |
======================================== |
[SOURCE: https://en.wikipedia.org/w/index.php?title=Texture_mapping&action=edit§ion=9] | [TOKENS: 1430] |
Editing Texture mapping (section) Copy and paste: – — ° ′ ″ ≈ ≠ ≤ ≥ ± − × ÷ ← → · § Cite your sources: <ref></ref> {{}} {{{}}} | [] [[]] [[Category:]] #REDIRECT [[]] <s></s> <sup></sup> <sub></sub> <code></code> <pre></pre> <blockquote></blockquote> <ref></ref> <ref name="" /> {{Reflist}} <references /> <includeonly></includeonly> <noinclude></noinclude> {{DEFAULTSORT:}} <nowiki></nowiki> <!-- --> <span class="plainlinks"></span> Symbols: ~ | ¡ ¿ † ‡ ↔ ↑ ↓ • ¶ # ∞ ‹› «» ¤ ₳ ฿ ₵ ¢ ₡ ₢ $ ₫ ₯ € ₠ ₣ ƒ ₴ ₭ ₤ ℳ ₥ ₦ ₧ ₰ £ ៛ ₨ ₪ ৳ ₮ ₩ ¥ ♠ ♣ ♥ ♦ 𝄫 ♭ ♮ ♯ 𝄪 © ¼ ½ ¾ Latin: A a Á á À à  â Ä ä Ǎ ǎ Ă ă Ā ā à ã Å å Ą ą Æ æ Ǣ ǣ B b C c Ć ć Ċ ċ Ĉ ĉ Č č Ç ç D d Ď ď Đ đ Ḍ ḍ Ð ð E e É é È è Ė ė Ê ê Ë ë Ě ě Ĕ ĕ Ē ē Ẽ ẽ Ę ę Ẹ ẹ Ɛ ɛ Ǝ ǝ Ə ə F f G g Ġ ġ Ĝ ĝ Ğ ğ Ģ ģ H h Ĥ ĥ Ħ ħ Ḥ ḥ I i İ ı Í í Ì ì Î î Ï ï Ǐ ǐ Ĭ ĭ Ī ī Ĩ ĩ Į į Ị ị J j Ĵ ĵ K k Ķ ķ L l Ĺ ĺ Ŀ ŀ Ľ ľ Ļ ļ Ł ł Ḷ ḷ Ḹ ḹ M m Ṃ ṃ N n Ń ń Ň ň Ñ ñ Ņ ņ Ṇ ṇ Ŋ ŋ O o Ó ó Ò ò Ô ô Ö ö Ǒ ǒ Ŏ ŏ Ō ō Õ õ Ǫ ǫ Ọ ọ Ő ő Ø ø Œ œ Ɔ ɔ P p Q q R r Ŕ ŕ Ř ř Ŗ ŗ Ṛ ṛ Ṝ ṝ S s Ś ś Ŝ ŝ Š š Ş ş Ș ș Ṣ ṣ ß T t Ť ť Ţ ţ Ț ț Ṭ ṭ Þ þ U u Ú ú Ù ù Û û Ü ü Ǔ ǔ Ŭ ŭ Ū ū Ũ ũ Ů ů Ų ų Ụ ụ Ű ű Ǘ ǘ Ǜ ǜ Ǚ ǚ Ǖ ǖ V v W w Ŵ ŵ X x Y y Ý ý Ŷ ŷ Ÿ ÿ Ỹ ỹ Ȳ ȳ Z z Ź ź Ż ż Ž ž ß Ð ð Þ þ Ŋ ŋ Ə ə Greek: Ά ά Έ έ Ή ή Ί ί Ό ό Ύ ύ Ώ ώ Α α Β β Γ γ Δ δ Ε ε Ζ ζ Η η Θ θ Ι ι Κ κ Λ λ Μ μ Ν ν Ξ ξ Ο ο Π π Ρ ρ Σ σ ς Τ τ Υ υ Φ φ Χ χ Ψ ψ Ω ω {{Polytonic|}} Cyrillic: А а Б б В в Г г Ґ ґ Ѓ ѓ Д д Ђ ђ Е е Ё ё Є є Ж ж З з Ѕ ѕ И и І і Ї ї Й й Ј ј К к Ќ ќ Л л Љ љ М м Н н Њ њ О о П п Р р С с Т т Ћ ћ У у Ў ў Ф ф Х х Ц ц Ч ч Џ џ Ш ш Щ щ Ъ ъ Ы ы Ь ь Э э Ю ю Я я ́ IPA: t̪ d̪ ʈ ɖ ɟ ɡ ɢ ʡ ʔ ɸ β θ ð ʃ ʒ ɕ ʑ ʂ ʐ ç ʝ ɣ χ ʁ ħ ʕ ʜ ʢ ɦ ɱ ɳ ɲ ŋ ɴ ʋ ɹ ɻ ɰ ʙ ⱱ ʀ ɾ ɽ ɫ ɬ ɮ ɺ ɭ ʎ ʟ ɥ ʍ ɧ ʼ ɓ ɗ ʄ ɠ ʛ ʘ ǀ ǃ ǂ ǁ ɨ ʉ ɯ ɪ ʏ ʊ ø ɘ ɵ ɤ ə ɚ ɛ œ ɜ ɝ ɞ ʌ ɔ æ ɐ ɶ ɑ ɒ ʰ ʱ ʷ ʲ ˠ ˤ ⁿ ˡ ˈ ˌ ː ˑ ̪ {{IPA|}} This page is a member of 12 hidden categories (help): |
======================================== |
[SOURCE: https://en.wikipedia.org/wiki/Nearest-neighbor_interpolation] | [TOKENS: 258] |
Contents Nearest-neighbor interpolation Nearest-neighbor interpolation (also known as proximal interpolation or, in some contexts, point sampling) is a simple method of multivariate interpolation in one or more dimensions. Interpolation is the problem of approximating the value of a function for a non-given point in some space when given the value of that function in points around (neighboring) that point. The nearest neighbor algorithm selects the value of the nearest point and does not consider the values of neighboring points at all, yielding a piecewise-constant interpolant. The algorithm is very simple to implement and is commonly used (usually along with mipmapping) in real-time 3D rendering to select color values for a textured surface. Connection to Voronoi diagram For a given set of points in space, a Voronoi diagram is a decomposition of space into cells, one for each given point, so that anywhere in space, the closest given point is inside the cell. This is equivalent to nearest neighbor interpolation, by assigning the function value at the given point to all the points inside the cell. The figures on the right side show by color the shape of the cells. See also References This applied mathematics–related article is a stub. You can help Wikipedia by adding missing information. |
======================================== |
[SOURCE: https://en.wikipedia.org/wiki/Trilinear_interpolation] | [TOKENS: 1483] |
Contents Trilinear interpolation Trilinear interpolation is a method of multivariate interpolation on a 3-dimensional regular grid. It approximates the value of a function at an intermediate point ( x , y , z ) {\displaystyle (x,y,z)} within the local axial rectangular prism linearly, using function data on the lattice points. Trilinear interpolation is frequently used in numerical analysis, data analysis, and computer graphics. Related methods Trilinear interpolation is the extension of linear interpolation, which operates in spaces with dimension D = 1 {\displaystyle D=1} , and bilinear interpolation, which operates with dimension D = 2 {\displaystyle D=2} , to dimension D = 3 {\displaystyle D=3} . These interpolation schemes all use polynomials of order 1, giving an accuracy of order 2, and it requires 2 D = 8 {\displaystyle 2^{D}=8} adjacent pre-defined values surrounding the interpolation point. There are several ways to arrive at trilinear interpolation, which is equivalent to 3-dimensional tensor B-spline interpolation of order 1, and the trilinear interpolation operator is also a tensor product of 3 linear interpolation operators. For an arbitrary, unstructured mesh (as used in finite element analysis), other methods of interpolation must be used; if all the mesh elements are tetrahedra (3D simplices), then barycentric coordinates provide a straightforward procedure. Formulation On a periodic and cubic lattice, we want the value at x {\displaystyle x} , y {\displaystyle y} , z {\displaystyle z} . In the general case, each coordinate (for example, x {\displaystyle x} ) is not exactly at a lattice point, but some distance between one lattice point x 0 {\displaystyle x_{\text{0}}} and the next, x 1 {\displaystyle x_{\text{1}}} . Let x d {\displaystyle x_{\text{d}}} be that fractional distance away from the lower lattice point: x − x 0 x 1 − x 0 {\displaystyle {\frac {x-x_{0}}{x_{1}-x_{0}}}} . Take a similar approach for the other coordinates: First one interpolates along x {\displaystyle x} (imagine one is "pushing" the face of the cube defined by C 0 j k {\displaystyle C_{0jk}} to the opposing face, defined by C 1 j k {\displaystyle C_{1jk}} ), giving: Where c 000 {\displaystyle c_{000}} means the function value of ( x 0 , y 0 , z 0 ) . {\displaystyle (x_{0},y_{0},z_{0}).} Then one interpolates these values (along y {\displaystyle y} , "pushing" from C i 0 k {\displaystyle C_{i0k}} to C i 1 k {\displaystyle C_{i1k}} ), giving: Finally one interpolates these values along z {\displaystyle z} (walking through a line): This gives a predicted value for the point, which can also be written as follows: c = c 000 ( 1 − x d ) ( 1 − y d ) ( 1 − z d ) + c 100 x d ( 1 − y d ) ( 1 − z d ) + c 010 ( 1 − x d ) y d ( 1 − z d ) + c 110 x d y d ( 1 − z d ) + c 001 ( 1 − x d ) ( 1 − y d ) z d + c 101 x d ( 1 − y d ) z d + c 011 ( 1 − x d ) y d z d + c 111 x d y d z d {\displaystyle {\begin{aligned}c&=c_{000}(1-x_{d})(1-y_{d})(1-z_{d})\\&\quad +c_{100}\,x_{d}(1-y_{d})(1-z_{d})\\&\quad +c_{010}(1-x_{d})\,y_{d}(1-z_{d})\\&\quad +c_{110}\,x_{d}\,y_{d}(1-z_{d})\\&\quad +c_{001}(1-x_{d})(1-y_{d})\,z_{d}\\&\quad +c_{101}\,x_{d}(1-y_{d})\,z_{d}\\&\quad +c_{011}(1-x_{d})\,y_{d}\,z_{d}\\&\quad +c_{111}\,x_{d}\,y_{d}\,z_{d}\end{aligned}}} This makes it obvious that result of trilinear interpolation is independent of the order of the interpolation steps along the three axes: any other order, for instance along y {\displaystyle y} , then along z {\displaystyle z} , and finally along x {\displaystyle x} , produces the same value. The above operations can be visualized as follows: First we find the eight corners of a cube that surround our point of interest. These corners have the values c 000 {\displaystyle c_{000}} , c 100 {\displaystyle c_{100}} , c 010 {\displaystyle c_{010}} , c 110 {\displaystyle c_{110}} , c 001 {\displaystyle c_{001}} , c 101 {\displaystyle c_{101}} , c 011 {\displaystyle c_{011}} , c 111 {\displaystyle c_{111}} . Next, we perform linear interpolation between c 000 {\displaystyle c_{000}} and c 100 {\displaystyle c_{100}} to find c 00 {\displaystyle c_{00}} , c 001 {\displaystyle c_{001}} and c 101 {\displaystyle c_{101}} to find c 01 {\displaystyle c_{01}} , c 011 {\displaystyle c_{011}} and c 111 {\displaystyle c_{111}} to find c 11 {\displaystyle c_{11}} , c 010 {\displaystyle c_{010}} and c 110 {\displaystyle c_{110}} to find c 10 {\displaystyle c_{10}} . Now we do interpolation between c 00 {\displaystyle c_{00}} and c 10 {\displaystyle c_{10}} to find c 0 {\displaystyle c_{0}} , c 01 {\displaystyle c_{01}} and c 11 {\displaystyle c_{11}} to find c 1 {\displaystyle c_{1}} . Finally, we calculate the value c {\displaystyle c} via linear interpolation of c 0 {\displaystyle c_{0}} and c 1 {\displaystyle c_{1}} In practice, a trilinear interpolation is identical to two bilinear interpolation combined with a linear interpolation: An alternative way to write the solution to the interpolation problem is where the coefficients are found by solving the linear system yielding the result See also External links |
======================================== |
[SOURCE: https://en.wikipedia.org/wiki/Wrapping_(graphics)] | [TOKENS: 217] |
Contents Wrapping (graphics) In computer graphics, wrapping is the process of limiting a position to an area. A good example of wrapping is wallpaper, a single pattern repeated indefinitely over a wall. Wrapping is used in 3D computer graphics to repeat a texture over a polygon, eliminating the need for large textures or multiple polygons. To wrap a position x to an area of width w, calculate the value x ′ = x mod w {\displaystyle x'=x{\text{ mod }}w} . Implementation For computational purposes the wrapped value x' of x can be expressed as where x max {\displaystyle x_{\text{max}}} is the highest value in the range, and x min {\displaystyle x_{\text{min}}} is the lowest value in the range. Pseudocode for wrapping of a value to a range other than 0–1 is Pseudocode for wrapping of a value to a range of 0–1 is Pseudocode for wrapping of a value to a range of 0–1 without branching is, See also |
======================================== |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.