Skip to the content ForoHackers
Log inJoin

Computer graphics: start here

Computer graphics
#2975 · · Quote · Report

Computer graphics is the craft of turning numbers into images: shapes, light and colour described in memory, then drawn on a screen or printed. It runs games, films, maps, interfaces and design tools. Under all of it sits geometry, linear algebra and a few clever ways of deciding which colour each pixel gets.

Key concepts

  • Transforms: translation, rotation and scale as matrices, chained to move a model from its own space to the screen.
  • Geometry: triangles and meshes, with vertices carrying positions, normals and texture coordinates.
  • The pipeline: vertices are transformed, assembled into triangles, turned into fragments, shaded and written to a frame buffer.
  • Colour and light: RGB, gamma, and a model of how surfaces reflect light.
  • Textures and sampling: images mapped onto surfaces, filtered to avoid shimmering and jagged edges.

Vocabulary

  • Pixel and fragment: a pixel is a dot on the screen; a fragment is a candidate pixel produced by drawing a triangle.
  • Depth buffer: a per-pixel record of the nearest surface, used to hide what is behind.
  • Rasterisation: finding the pixels a triangle covers.
  • Aliasing: stair-step artefacts from sampling a detailed scene on a coarse grid.

What to study, in order

  1. Vectors, dot and cross products, and matrices; rotate a 2D shape by hand.
  2. Draw a line and fill a triangle in plain code, writing pixels into an image file.
  3. Add a perspective camera and spin a wireframe cube.
  4. Add a depth buffer, per-pixel lighting and a texture.
  5. Load a mesh from a file and draw it with a graphics API such as OpenGL or Vulkan.

Related tags

#rendering #gpu #linear-algebra #game-development

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply