1 - Intro and Primitives Flashcards
what is a pen plotter ?
What is colour & how do you display it onscreen?
A pure colour is a wave on the electromagnetic spectrum. Colours are essentially just energy distributions.
Wavelength determines the colour we see and the energy intensity (amplitude) determines the brightness.
Colours represented by X = rR+gG+bG
Capitals = light sources
non capitals = intensities
Primary Colours
magenta cyan yellow (centre white)
Addictive colours
red green blue (centre black)
Raster display:
Raster display:
2D array of picture elements (pixels).
The number of pixels in a display depends on the hardware used; older displays may only have had 300x200 pixels
Framebuffer
The framebuffer is an in-memory map of the display;
Uses one memory location for each pixel describe its properties (colour/intensity) – therefore, a buffer of size W x H x 3 is needed.
- Addressed in any order
- Read out sequentially
Double-buffering
use of two framebuffers
one being drawn into by the program,
another currently being displayed on screen
Then they swap
Rasterization
the pictures or scenes are written to the framebuffer by converting infinite precision specification into pixels
What are primitives?
basic mathematical objects, such as lines, curves, and polygons, which can be combined to create more complex graphical images.
They are specified by location and dimension and are thought of as having zero width
Rendered with attributes – e.g. colour, line style etc.
To model a scene:
⦁ Construct complex objects from simpler ones, in the local space
⦁ Apply some transformation (e.g. adjust position, scale, rotation etc.) from the local space to place objects into the world space
⦁Draw the object with visual attributes
Order of object creation:
- Complex object created in the local coordinate system
- Complex Object translated into the world coordinate system and positioned in the scene
- the scene is clipped to the window ( window coordinate specifies the world coordinates it wasnt to include in the scene)
- The window is mapped to the device coordinates (view coordinates / viewport (ex. specific pixels))
Difference between GL_LINE_STRIP and loop
the loop closes itself and loops the last point back to the first.
Scene clipping
rendering a larger area, but clipping the scene to just a smaller window
Viewport mapping
Mapping the window to the viewport involves translating the clipped 3D world (specified in world coordinates) to the 2D viewport coordinates.