# Fractals/Computer graphic techniques/2D/grid

The domain has been discretized into a mesh and then rasterized to the image

## Image

Digital image

• binary image ( 1-bit color)
• grayscale image
• color image

# grid

see aslo:

• ruler
• axis

• 2D
• 3D

## Types

classify grids is by their basic grid elements:

• regular mesh = Structured grid = global grid ( finite differences)
• a quadrilateral grid is most common in structured grids
• a triangular mesh : triangles are one of the most basic and standard ways to draw all kinds of meshes and shapes
• "the Coxeter-Freudenthal triangulation. It is constructed by dividing space using a uniform cubic grid and the triangulation is obtained by subdividing each cube." 
• hexagonal
• An unstructured = irregular grid, adaptive grid, local grid ( fast marching methods). Grid Refinement = Adaptive Meshes
• BSP tree
• A triangular surface mesh is always quick and easy to create. It is most common in unstructured grids.

tilings by regular polygons: regular (=structured ) grid

### triangulation

#### Applications

• For morphing images the Delaunay triangulation provides a 'good' way to create a triangular mesh from points that are going to be moved. Each triangle can be distorted in a simple way, leading to a complex 'morphing' distortion of the overall image. In the example of morphing shown, the triangular shapes are distorted from one image to the next, so for example the hair in the first image is distorted to fit the hair in the second. At the same time as that happens, the colours 'cross fade' from one colour to another so the grey cross fades to brown.   Sierra Nevada terrain map 2D triangular mesh 2D solution calculated from mesh
• For modelling terrain or other objects given a set of sample points, the Delaunay triangulation gives a nice set of triangles to use as polygons in the model. In particular, the Delaunay triangulation avoids narrow triangles (as they have large circumcircles compared to their area).
• Delaunay triangulations are used in many other applications where a shape has to be divided up into triangles. Analysis of stresses and strains in structures is often done using a triangular mesh. In the analysis shown above, more points are put in the area of most interest to get a finer more detailed analysis in that area. That's also what we do when morphing images - we put more points where we want most control over the fine details of the morphing. If you want to change a frown into a smile, put more points around the mouth so you can change the shape more easily.

# mesh

A mesh is a representation of a larger geometric domain by smaller discrete cells.

Types by cells:

• polygon mesh is a collection of vertices, edges and faces that defines the shape of a polyhedral object.
• The faces usually consist of triangles (triangle mesh)