Computer Graphics

There's a total of 23 articles.




Flat shading

Flat shading
Flat shading is the simplest shading model, we cover the advantages/disadvantages and a simple implementation in GLSL.
Me
Published on Thu, Jun 9, 2016
Last modified on Sun, Jun 16, 2024
106 words - Page Source

Diffuse shading

Diffuse shading
Diffuse shading is a technique to render the surface of objects that are not shinny.

As an example on the picture (credits to Marc Kleen) we see a real life car with a matte coating which we want to emulate using the Lambertian shading model.
Me
Published on Fri, Jun 3, 2016
Last modified on Sun, Jun 16, 2024
343 words - Page Source

Introduction to surface shading

Introduction to surface shading
Surface shading is a process to color a surface, in computer graphic applications this is done to mimic how objects look in real life. This article covers the variables available in the rendering pipeline.
Me
Published on Fri, Jun 3, 2016
Last modified on Sun, Jun 16, 2024
180 words - Page Source

Quaternions

Quaternions
Quaternions are an alternate way to describe orientation or rotations in 3d space using an ordered set of four numbers. They have the ability to uniquely describe any 3d rotation about an arbitrary axis and do not suffer from a problem using euler angles called gimbal lock.
Me
Published on Tue, Apr 26, 2016
Last modified on Sat, Nov 9, 2024
809 words - Page Source

Culling & Clipping

Culling & Clipping

The math behind culling and clipping and how it’s related with the camera and with what it sees.


  • Culling is a process where geometry that’s not visible from the camera is discarded to save processing time.
  • Clipping is a process that removes parts of primitives that are outside the view volume (clipping against the six faces of the view volume).
Me
Published on Wed, Mar 16, 2016
Last modified on Sun, Nov 17, 2024
335 words - Page Source

Vector spaces

Vector spaces

A vector space is a set whose elements are called “vectors” (denoted as $\v{v}$ or $\mathbf{v}$) which have two operations defined on them: addition of vectors and multiplication of an scalar by a vector.


This article covers some examples of vector spaces, basis of vectores spaces and linear maps.
Me
Published on Mon, Mar 14, 2016
Last modified on Sun, Jun 16, 2024
544 words - Page Source

Transformation matrix to transform objects from NDC coordinates to screen coordinates (viewport transform)

Transformation matrix to transform objects from NDC coordinates to screen coordinates (viewport transform)

One matrix transformation in the 3D to a 2D transformation pipeline is the viewport transform where objects are transformed from normalized device coordinates (NDC) to screen coordinates (SC).


In short it's the transformation of numbers in the range [-1, 1] to numbers corresponding to pixels on the screen, which is a linear mapping computed with linear interpolation.
In this article I cover the math behind the generation of the viewport transformation matrix.
Me
Published on Tue, Mar 8, 2016
Last modified on Sun, Jun 16, 2024
285 words - Page Source

Normals

Normals
A normal vector to a curve at a particular point is a vector perpendicular to the tangent vector of the curve at that point (also called a gradient).
Me
Published on Tue, Mar 8, 2016
Last modified on Sun, Jun 16, 2024
437 words - Page Source

Eigenvalues and eigenvectors

Eigenvalues and eigenvectors
An eigenvalue represents how the object scales (or stretches/compresses) a particular direction (or eigenvector) when acted upon by the object. This article covers how to find these values in a square matrix as well as how it’s applicable in compute graphics.
Me
Published on Mon, Mar 7, 2016
Last modified on Sun, Jun 16, 2024
417 words - Page Source

Ray Tracing

Ray Tracing
Ray tracing is the process to identify the color of all the pixels in a 2d screen by emitting rays from all the pixels simulating how light travels in real life. This article covers the math for the ray generation from each pixel for both orthographic and perspective cameras.
Me
Published on Fri, Feb 26, 2016
Last modified on Sun, Jun 16, 2024
1240 words - Page Source

Rendering

Rendering
Rendering is a process that takes an input a set of objects and produces as its output an array of pixels (image) each of which stores information about the color of the image at a particular point in a grid (determined by the target width and height).
Me
Published on Fri, Feb 26, 2016
Last modified on Sun, Jun 16, 2024
358 words - Page Source

Transformation matrix for projection of 3D objects into a 2D plane (projection transform)

Transformation matrix for projection of 3D objects into a 2D plane (projection transform)

In Computer Graphics 3D objects created in an abstract 3D world will eventually need to be displayed in a screen, to view these objects in a 2D plane like a screen objects will need to be projected from the 3D space to the 2D plane with a transformation matrix.


In this article I cover two types of transformations: Orthographic projection and Perspective projection and analyze the math behind the transformation matrices.
Me
Published on Sun, Feb 14, 2016
Last modified on Fri, Nov 22, 2024
2559 words - Page Source

Transformation matrix to transform 3D objects from World Space to View Space (View transform)

Transformation matrix to transform 3D objects from World Space to View Space (View transform)

One matrix transformation in the 3D to a 2D transformation pipeline is the view transform where objects are transformed from world space to view space. a transformation matrix.


In this article I cover the math behind the generation of this transformation matrix.
Me
Published on Sat, Feb 13, 2016
Last modified on Sun, Jun 16, 2024
704 words - Page Source

Combining Matrix Transformations

Combining Matrix Transformations
Taking multiple matrices each encoding a single transformations and combining them is how we transform vectors between different spaces. This article creating a transformation matrix that combines a rotation followed by a translation, a translation followed by a rotation and creating transformation matrices to transform between different coordinate systems.
Me
Published on Wed, Feb 10, 2016
Last modified on Sun, Jun 16, 2024
1137 words - Page Source

Perspective projection

Perspective projection
Perspective projection is a fundamental projection technique that transforms objects in a higher dimension to a lower dimension. This transformation is usually used for objects in a 3d world to be rendered into a screen (a 2d surface), in the transformation these objects give the realistic impression of depth.

This article covers the math behind it and how to generate the transformation matrix to achieve the transformation.
Me
Published on Sat, Feb 6, 2016
Last modified on Sun, Jun 16, 2024
380 words - Page Source

Orthographic projection

Orthographic projection
Orthographic projection is a fundamental projection technique that transforms objects in a higher dimension to a lower dimension. This transformation is usually used for objects in a 3d world to be rendered into a screen (a 2d surface) and in the process keeps parallel lines parallel in the lower dimension.

This article covers the math behind it and how to generate the transformation matrix to achieve the transformation.
Me
Published on Fri, Feb 5, 2016
Last modified on Sun, Jun 16, 2024
450 words - Page Source

Translating objects with a Transformation Matrix

Translating objects with a Transformation Matrix
We build different types of transformation matrices to translate objects along cardinal axes, arbitrary axes in 2d and 3d with matrix multiplication!
Me
Published on Fri, Feb 5, 2016
Last modified on Sun, Nov 17, 2024
694 words - Page Source

Euler angles

Euler angles

Euler angles are a way to describe the orientation of a rigid body with 3 values, these values represent 3 angles:

  • yaw - Rotation around the vertical axis
  • pitch - Rotation around the side-to-side axis
  • roll - Rotation around the front-to-back axis
Me
Published on Fri, Feb 5, 2016
Last modified on Fri, Nov 22, 2024
1044 words - Page Source

Shearing objects with a Transformation Matrix

Shearing objects with a Transformation Matrix
Shearing is a transformation that skews the coordinate space, the idea is to add a multiple of one coordinate to the other
Me
Published on Fri, Feb 5, 2016
Last modified on Sun, Jun 16, 2024
356 words - Page Source

Introduction to rotation for computer graphics

Introduction to rotation for computer graphics

The basics of rotation in 2d and 3d for computer graphics with a focus on 3d rotation about cardinal axes and 3d rotation with quaternions.


For quaternions, please also look at https://eater.net/quaternions amazing animations!

Me
Published on Tue, Dec 15, 2015
Last modified on Sun, Jun 16, 2024
2262 words - Page Source

Scaling objects with a Transformation Matrix

Scaling objects with a Transformation Matrix
We build different types of transformation matrices to scale objects along cardinal axes, arbitrary axes in 2d and 3d with matrix multiplication!
Me
Published on Tue, Oct 20, 2015
Last modified on Sun, Jun 16, 2024
614 words - Page Source

Transformation matrix

Transformation matrix
A linear transformation can be represented with a matrix which transforms vectors from one space to another. Transformation matrices allow arbitrary transformations to be displayed in the same format. Also matrices can be multiplied to enable composition. This article covers how to think and reason about these matrices and the way we can represent them (row vectors vs column vectors).
Me
Published on Thu, Oct 15, 2015
Last modified on Sun, Jun 16, 2024
841 words - Page Source

Coordinate systems and transformations between them

Coordinate systems and transformations between them
The position and orientation of an object in real life can be described with direction and magnitude e.g. the TV is 3 meters in front of me. While that description is good for me it might be that for someone else in a room the TV is 5 meters to the right of that person. Information about objects are given in the context of a reference frame. Usually in Computer Graphics objects need to be expressed with respect to the camera frame, this article covers why we need to have multiple reference frames as well as the math needed to express objects in a different reference frame.
Me
Published on Thu, Oct 15, 2015
Last modified on Sun, Jun 16, 2024
855 words - Page Source