Explore chapters and articles related to this topic
Smart City Portrayal
Published in Amir H. Alavi, William G. Buttlar, Data Analytics for Smart Cities, 2018
Evgheni Polisciuc, Penousal Machado
The implementation of the fragment shader is presented in pseudo-code Algorithm 1. The function influence() is the implementation of Equation 4.1. The fragment shader runs this code for each pixel of the canvas and computes its color. Depending on the category of the given points the influence is accumulated to the corresponding color. For the sake of simplicity and since in our case there are only two categories, the sign of each class is bound directly with the color components – red and green for positive and negative values, respectively.
HDR Pipeline
Published in Francesco Banterle, Alessandro Artusi, Kurt Debattista, Alan Chalmers, Advanced High Dynamic Range Imaging, 2017
Francesco Banterle, Alessandro Artusi, Kurt Debattista, Alan Chalmers
Rasterization. Rasterization [13] uses a different approach than ray tracing for rendering. The main concept is the projection of each primitive in the scene onto the screen (frame buffer) and, subsequently, its discretization of it into fragments, which are then rasterized into the final image. When a primitive is projected and discretized, visibility has to be solved to have a correct visualization and to avoid incorrect overlap between objects. For this task, the Z-buffer [85] is generally used. The Z-buffer is an image of, typically, the same size as the frame buffer that stores depth values of previous solved fragments. For each fragment at a position x, its depth value, F(x)z, is tested against the stored one in the Z-buffer, Z(x)z. If F(x)z < Z(x)z, the new fragment is written in the frame buffer, and F(x)z is placed in the Z-buffer. After the depth test, lighting is evaluated for all fragments. However, shadows, reflections, refractions, and inter-reflections cannot be handled natively with this process since rays are not shot. These effects are often emulated by rendering the scene from different positions. For example, shadows can be emulated by calculating a Z-buffer from the light source position and applying a depth test during shading to determine if the point is in shadow. This method is known as shadow mapping [420]. The main advantage of rasterization is that it is supported by current graphics hardware, which allows high performances in terms of drawn primitives. Such performance is achieved since it is straightforward to parallelize rasterization: fragments are coherent and independent, and data structures are easy to update. Nevertheless, the emulation of physically based light transport effects (i.e., shadows, reflections/refractions, etc.) is not as accurate as ray tracing and is biased in many cases.
Virtual reality for synergistic surgical training and data generation
Published in Computer Methods in Biomechanics and Biomedical Engineering: Imaging & Visualization, 2021
Adnan Munawar, Zhaoshuo Li, Punit Kunjam, Nimesh Nagururu, Andy S. Ding, Peter Kazanzides, Thomas Looi, Francis X. Creighton, Russell H. Taylor, Mathias Unberath
We utilised OpenGL’s Z-buffer6 and Framebuffer objects7 to generate the point cloud data. Our application utilises perspective cameras from OpenGL, which induce non-linearity in the generated depth values. The non-linear depth values need to be linearised. This step can be performed on the GPU for faster processing (in the fragment shader (Alg. 1)) however the values must also be normalised to avoid truncation by the fragment shader’s output. Finally, on the CPU, these normalised values are rescaled to get the correct point could. The maximum dimensions () of the view frustum are used for both the normalisation and scaling. The vector is calculated as:
Construction of the developing connecting tree
Published in Engineering Optimization, 2021
Valery M. Kirzhner, Elena V. Ravve, Zeev Volkovich
Thus, while linking a consecutive vertex to the already constructed fragment, the shortest path from the fragment to the vertex cannot be chosen. Such longer paths will be called altruistic. The vertices, lying on the altruistic path, will also be called altruistic (except the starting and the final vertices). It should be noticed that using altruistic, i.e. at this stage, intermediate points for connecting a given point is similar to using Steiner points in the classical problem of connection with the intermediate vertices. Evidently, all the altruistic vertices are those that will have to be linked later. The use of such vertices in the capacity of intermediate ones enables optimizing the trajectory as a whole; simultaneously, this opportunity causes difficulties in the solution of the problem, since the number of altruistic paths is great. In this connection, the following statement is important for making up algorithms for constructing the optimal developing tree.
The construction of virtual simulation platform for pingtan experimental area based on HTML5 and WebGL
Published in Enterprise Information Systems, 2020
WebGL programming involves graphing by calling the graphical interface in the WebGL context embedded in the browser, so no component loading is required. The browser completes hardware graphics acceleration by using GPU directly. The flow of graphing using WebGL is shown in Figure 6(b). First, the WebGL context was acquired; shaders were created according to shader code fragment, generally including vertex shader and fragment shader. The shaders were bound to WebGL context, and WebGL program was generated after connection. Then, an array of vertices and colour arrays were created for the graph objects to be drawn. If index way was used to construct surface, an array of vertex indexes was used. If mapping was used, the texture object and an array of vertex texture coordinates needed to be generated. Next, the arrays and texture objects required by the shader were bound for the WebGL context. The variables required by the shader for the WebGL context were set, including projection matrix and model view matrix. Finally, the graph object was drawn through the basic primitive drawing method of call WebGL.