Computer graphics -- 2007-2008 -- info.uvt.ro/Laboratory 1
Quick links: front; laboratories agenda, 1, 2, 3, 4, 5, 6, 7, 8, evaluation, tools, repository.
Introduction
[edit]Computer graphics
[edit]- Computer graphics
-
- computer graphics is a subfield of computer science and is concerned with digitally synthesizing and manipulating visual content (2D or 3D image processing).
- computer graphics broadly studies the manipulation of visual and geometric information using computational techniques.
Links:
Subfields
[edit]- Geometry
- studies methods to represent and process surfaces.
- Animation
- studies methods to represent and manipulate motion.
- Rendering
-
- studies algorithms to reproduce physically photo-realistic images;
- it usually implies light transport simulation;
- Rendering is a process for generating an image from a model by means of computer programs.
- Imaging
- studies image acquisition and editing.
Links:
- wikipedia:Constructive solid geometry
- wikipedia:Subdivision surface
- wikipedia:Polygon mesh
- wikipedia:Animation
- wikipedia:Rendering (computer graphics)
- wikipedia:Digital imaging
- wikipedia:Image processing
2D / 3D graphics
[edit]- 2D graphics
- implies computer-based generation of digital images (or image sequences -- animation), from (mostly 2-dimensional) models (like geometric shapes, text, other digital images), and manipulation techinques (rotation, translation, scaling, transparency, etc.).
- 3D graphics
- (just like 2D graphics) implies computer-based generation of digital images (or image sequences), from 3-dimensional geometric shapes.
Both 2D and 3D graphics are an umbrella for methods / algorithms from all subfields (like geometry, rendering and imaging).
It generally implies the following steps:
- modeling;
- scene layout;
- rendering;
As a comparison of the two the output is the same -- a 2-dimensional image (or sequence) --, but the inputs are different -- 2D shapes / 3D shapes.
Links:
- wikipedia:2D computer graphics
- wikipedia:3D computer graphics
- wikipedia:3D modeling
- wikipedia:3D rendering
Digital images
[edit]- Digital image
- is the representation of an image as a bidimensional matrix of values -- pixels -- which encode the color of the coresponding image point.
Links:
Resolution
[edit]- Resolution
-
- the quantity of information stored in a digital image;
- usually it represents the number of pixels that compose the image;
Links:
- wikipedia:Image resolution
- wikipedia:Pixels per inch -- PPI -- very seldom used, but usually for to display devices;
- wikipedia:Dots per inch -- DPI -- very frequently used, but mainly for plotting / printing devices;
Color depth
[edit]- Bits per pixel
- the number of bits allocated / used to encode the color for each pixel.
Tipical cases:
- wikipedia:1-bit color = 2^1 = 2 colors: black and white image;
- 2-bit = 2^2 = 4 colors:
- 4-bit = 2^4 = 16 colors:
- wikipedia:8-bit color = 2^8 = 256 colors:
- 15-bit = 2^15 = 32768 colors:
- 5 bits for each RGB channel;
- wikipedia:Highcolor;
- 16-bits = 2^16 = 65536 colors:
- just like in the 15-bit case, but for the green channel we have 6 bits;
- wikipedia:Truecolor;
- 24-bits = 2^24 = 16777216 colors:
- 8 bits for each RGB channel;
Links:
Color spaces
[edit]- Color space
- a mathematical method to represent (encode) a color, usually like a tuple of numbers (integers or reals).
Links:
- wikipedia:Color space
- wikipedia:RGB color model -- Red Green Blue
- wikipedia:SRGB color space
- wikipedia:CMYK color model -- Cyan Magenta Yellow Black
- wikipedia:HSV color space -- Hue Saturation Value
- wikipedia:HSL color space -- Hue Saturation Luminance
- wikipedia:CIE 1931 color space
File formats
[edit]Links:
- wikipedia:Image file formats
- wikipedia:Portable Network Graphics -- PNG
- wikipedia:BMP file format -- BMP
- wikipedia:Truevision TGA
- wikipedia:JPEG
- wikipedia:Image_file_formats#Vector_formats
Technologies
[edit]OpenGL
[edit]- OpenGL stands for Open Graphics Library;
- is a specification for cross-platform API (Application Programmable Interface);
- it describes a set of functions, their inputs and outputs, and the resulting behaviors;
- it is used for 2D or 3D graphics;
- it was developed by Silicon Graphics in 1992;
- hardware manufactures design hardware to meet the feature requirements, meanwhile software implementors develop libraries that meet the standard functionality;
- purposes:
- hide hardware interfacing details;
- provide an unified programmable interface;
- it provides a procedural paradigm scene description, meaning that the programmer has to describe all the steps that are required to render a scene -- thus being a low-level library;
- there are a number of utility libraries built on top of OpenGL: GLU, GLUT, SDL;
- it focuses only on rendering, and not on windowing, keyboard / mouse input, or network related issues;
Links:
- wikipedia:OpenGL
- wikipedia:OpenGL Utility Library
- wikipedia:OpenGL Utility Toolkit
- wikipedia:Simple DirectMedia Layer
- wikipedia:Application programming interface
DirectX
[edit]- it is a collection of different APIs, each focusing on a specific task;
- it is used mainly in game development, but also for CAD;
- it is not a standard specification, but a closed-source software;
- the sub-APIs are:
- DirectDraw -- used for 2D graphics;
- Direct3D -- used for 3D graphics;
- DirectInput -- used for keyboard and mouse input;
- DirectPlay -- used for network / multi-play related tasks;
- DirectSound and DirectMusic -- used to play or record sounds;
- DirectShow;
- it is composed of:
- RT -- runtime -- needed to run an application using DirectX; (usually it is bundled with application installation kits, but also ships with the operating system;)
- SDK -- software development kit -- needed to develop an application using DirectX;
- it was created by Microsoft and first released in 1995;
- it runs only on Microsoft platforms (Windows and Xbox);
- like OpenGL the developer describes the scene for each step -- immediate mode;
- initially it included an implementation of the scene graph paradigm -- retained mode;
Links:
- wikipedia:DirectX
- wikipedia:DirectDraw
- wikipedia:Direct3D
- wikipedia:DirectInput
- wikipedia:DirectPlay
- wikipedia:DirectSound
- wikipedia:DirectMusic
- wikipedia:DirectShow
- wikipedia:Software framework
- wikipedia:Software development kit
- wikipedia:Runtime
Java 2D / Java 3D
[edit]Java 2D / Java 3D:
- Java 2D is an API for drawing 2D shapes;
- Java 3D is an API for drawing 3D objects;
- Java 3D runs on top of either OpenGL or DirectX;
- it is more than a wrapper by using a real object oriented concepts;
- Java 3D uses scene graph paradigm, but has also immediate mode;
Links:
JOGL -- Java OpenGL
[edit]- is a wrapper for OpenGL, mirroring all the GL functions, thus retaining the same API feeling;
- as OpenGL it does not include window related calls and there is no utility library for these tasks;
- delegates calls to OpenGL using JNI;
- from version 1.1.0 it provides full access to GL 2.0 features;
- conversion between OpenGL code written in C, and OpenGL code written in Java is extremely easy, due to the direct mapping (naming) of GL functions;
- since Java SE 6, Java 2D and Java OpenGL have become interoperable -- allowing developers to mix code;
Links:
XNA
[edit]- is a set of tools that facilitates computer game design and development;
- it tries to remove the boilerplate code;
- it tries to allow developers to focus on game content and experience;
- it is based on .Net Framework;
- it is usable from any .NET language (like C#);
- it was created by Microsoft in 2004;
Links:
Agenda
[edit]Please consult Computer graphics -- 2007-2008 -- info.uvt.ro/Laboratory agenda.
Evaluation
[edit]Please consult Computer graphics -- 2007-2008 -- info.uvt.ro/Laboratory evaluation.
Tools, frameworks and libraries
[edit]Please consult Computer graphics -- 2007-2008 -- info.uvt.ro/Laboratory tools.
Assignment
[edit]This is the first assignment, so please commit it to the folder assignment-01.
Write an essay that presents a comparative study between -- at least two of -- the following technologies:
- OpenGL;
- DirectX -- focusing on Direct3D;
- Java 2D / 3D -- focusing on Java 3D;
- JOGL;
- XNA;
It should touch the following topics:
- history -- birth and evolution;
- standardization, backing enterprises and organizations, industry acceptance;
- compatible hardware and software platforms (on which operating systems are they available, for which programming languages do bindings exist);
- features (what is available to the programmer in the latest versions);
- programming paradigms (is the framework object oriented or is it closer to structured programming);
- advantages and disadvantages;
The paper should pay special attention to the features and advantages / disadvantages, and it must also contain the bibliography.
It should be 2-3 pages in length, and formatted accordingly to the following rules:
- A4 paper size with a 2.5 cm margin on all directions;
- 12 pt Times New Roman, spaced at most 1.5 lines;
- only PDF or DOC, but not DOCX (as created by Microsoft Word 2007);
The paper should not contain copied information unless quoted and only sparingly.
For submission and evaluation please consult Computer graphics -- 2007-2008 -- info.uvt.ro/Laboratory evaluation.