Intro to computer graphics
A small collection of notes from my studies of computer graphic basics
Intro
Computer graphics are one of the most exciting and interesting areas in computer science. In short, the term computer graphics includes almost everything on a computer that is not text or sound. This includes simple things like windows, menus, and text, as well as more complex images like three-dimensional models and video sequences. From video games to 3D animation, a lot of it is built on the foundations of computer graphics. This post is a personal archive of my notes from reading Scratchapixel's post A Gentle Introduction to Computer Graphics (programming).
Terms
When starting to look into a topic such as computer graphics, it can be a little intimidating to dive given the amount terms used to discuss the topic. I've compiled this short list of terms from my readings.
Foreshortening: The further away an object gets the smaller it becomes.
Stereoscopic Vision: The combination of two images from slightly different angles used to approximate the distance and the position of objects in a 3D space with respect to each other.
Origin: The starting position (0,0).
Coordinate: A point within a coordinate system.
Cartesian Coordinate System: A coordinate system that specifics each point uniquely by a pair of numerical coordinates.
Topology: How points are connected to form faces.
Polygons: A composed image that are 3D in appearance. Usually triangular but not always. They appear when a surface is modeled, vertices are selected, and the object is rendered in a wire frame model.
Mesh: A 3D object representation consisting of a collection of vertices and polygons. A 3D object representation can be a polygon mesh.
Perspective Projection: The projection of the corners of a shape onto an imaginary canvas.
Viewing Frustum: The region of space in the modeled world that may appear on the screen. You can also think of it as the field of view of a perspective virtual camera.
Perspective Divide: When the point produced by the perspective matrix multiplication has a non-unitary 4th component that represents the perspective divide by z. This divide of each point by its 4th component completes the perspective transformation.
Screen Space: The projection of the camera space into a 2D coordinate system.
Normalization: The process that changes the range of pixel intensity values. To normalize something is to remap the values from any range to a range of [0, 1]
Scene: A collection of objects.
Offline Rendering: Rendering that is not limited to a time constraint. Rendering offline is basically preparing a scene for rendering which the result will be viewed offline once the render is complete.
Real-time Rendering: Rendering that started the moment we ask for it. Commonly seen in video games where we have to render each frame during game play.
Key Takeaways
- We need vertices and topology before we create the image of the 3D scene.
- Rendering is a critical part of the creation of 3D images.
- Geometry is very important as it allows us to handle object transformations (scale, rotation, and translation). It also allows us to handle the computation of angles between lines or to find out the intersection between a line and other shapes.
- When animating a shape, it has to be re-rendered at each frame.
- Common computational tasks include, rendering and simulations.
- The more geometry a scene has, the more expensive that computational task becomes.
Conclusion
Computer graphics are used in a variety of fields, including advertising, architecture, art, automotive design, biomedical visualization, computer-aided design (CAD), computer games, education, entertainment, film, video post-production, virtual reality, etc. The landscape is consistently changing with new tools and technology coming out to simplify the creation of 3D products. It can be a little intimidating to jump into the industry given the amount of options that exist today. However, I would say that is the best part about computer graphics.