Computer graphics (source code)

= Computer graphics
{wiki}

<Computer graphics> creates visual representations from geometric models and numerical data. <Vector graphics> store shapes and drawing instructions, while <raster graphics> store an <array> of <pixels>. A drawing may use both: a geometric object can be rendered into a <raster image> and then combined with existing image data.

For example, three <points> specify a <triangle>. A <perspective projection> maps its geometry into a camera view, and <rasterization> determines contributions to output <pixels>. Their values can depend on a <color model>, surface response and illumination; <ray tracing (computer graphics)> provides another way to determine visible surface interactions.

The stored representation and the sampled output answer different questions. A smooth geometric boundary can cross a <pixel> footprint, so choosing only one sample may introduce <aliasing>. <Raster sampling and reconstruction> makes that loss of detail explicit. <Image processing> then transforms an existing image, while <computer graphics> can generate one from a geometric description.