Graphics and Rendering
-
Points and Vectors in a Graphics Scene
A point represents a position in a coordinate system. A displacement vector represents a change in position under that same coordinate convention.
-
Local and World Coordinates
An object's local coordinates describe positions relative to that object. World coordinates place the object and its points in the wider scene.
-
Why Order Matters for Graphics Transforms
Applying transformations in a different order can change a point's result. This matters when combining scale, translation, or rotation.
-
Rotating a Point Through Ninety Degrees
Follow a counterclockwise quarter turn around the origin in coordinates with the x-axis pointing right and the y-axis pointing up.
-
Homogeneous Coordinates for 2D Transforms
An extra coordinate lets a matrix express translation alongside linear operations in a common representation.
-
An Orthographic Projection by Example
An orthographic projection maps along parallel directions. In an aligned view, image-plane coordinates can depend on x and y without scaling them by depth.
-
Perspective Projection and Depth
A simple perspective camera divides horizontal and vertical camera coordinates by depth and scales them by focal length.
-
Camera Position and View Coordinates
A camera transform expresses scene positions relative to its origin and axes. A later projection maps those coordinates into an image model.
-
Mapping Relative Screen Coordinates to Pixels
A viewport transform maps a coordinate rectangle to an image's dimensions, with a convention for pixel centers and axis direction.
-
A Triangle as Three Ordered Vertices
A triangle primitive uses three positions. Their order can indicate the orientation of the face under a rendering convention.
-
Inside a Triangle with Three Weights
Barycentric weights express a point as a combination of three triangle vertices whose coefficients sum to one.
-
Sampling a Geometric Edge on a Pixel Grid
A rasterizer decides which discrete locations represent a geometric shape. Sampling at a fixed point per pixel can lose subpixel features.
-
Choosing a Visible Sample with a Depth Buffer
A depth buffer keeps a comparison value for a pixel so a nearer covered surface can replace a farther one under the configured convention.
-
Clipping Geometry Before Perspective Division
Clipping can restrict a primitive to the valid view region before projecting its points. A partially visible edge may need a new boundary vertex.
-
A Normal Vector and the Direction of Light
A surface normal gives an orientation perpendicular to a local surface. Its relationship to an incident direction can inform simple diffuse shading.
-
Linear Light and Encoded Color Values
Some color values use a nonlinear transfer curve for storage or display. Mixing those encoded values numerically can differ from mixing light.
-
Compositing a Foreground with Opacity
Blend a partially opaque foreground over an opaque background using compatible linear color values.
-
Premultiplied Color with Alpha
A premultiplied representation stores color components already multiplied by alpha. That choice changes which arithmetic is used when combining samples.
-
Texture Coordinates and Image Samples
A texture coordinate maps a surface point to a position in an image or other sampled table. A convention establishes orientation and extent.
-
Filtering a Texture with Four Nearby Samples
Bilinear texture filtering combines nearby samples according to the location inside their cell, under the texture's coordinate convention.
-
A Ray as an Origin, Direction, and Parameter
Write a ray using its origin and direction, and interpret its parameter in scene coordinates.
-
One Ray–Plane Intersection
An intersection can be found by substituting the ray equation into the plane condition and solving for its parameter.
-
Choosing the Nearest Positive Intersection
A ray can intersect more than one surface. A visibility query can select the smallest valid positive parameter under the ray's interval convention.
-
Bounding Boxes for Skipping Unneeded Geometry
A bounding box encloses a set of shapes. If a query misses an enclosing box, it cannot hit the enclosed shapes.
-
Supersampling a Partly Covered Pixel
Sampling at several positions within one pixel can approximate the visible contribution of a geometric shape.
-
An Indexed Mesh and Shared Positions
A mesh can store vertices once and use per-face indices to refer to the positions forming each polygon.
-
Flat and Interpolated Triangle Attributes
A renderer can keep one attribute constant across a face or compute values from the vertices under an interpolation rule.
-
A Geometry Test with an Asymmetric Shape
Tests for transformations should include an asymmetric fixture so mirrored, rotated, or transposed results differ visibly.
-
Drawing Coordinates and Backing Pixel Dimensions
An interface can use logical drawing units while its stored image or screen device uses another number of pixels per displayed unit.
-
Testing Geometry and Render Output Separately
A geometry check can verify transformed positions and visibility rules, while a rendered fixture checks how those calculations appear together.