This preview shows page 1. Sign up to view the full content.
Unformatted text preview: l of graphics processing operates directly
on the pixels in a window provided by the operating
• Typical Primitives are: !
SetPixel(int x, int y, int colour); !
DrawLine(int xs, int ys, int xf, int yf); !
! • etc. ! Graphics Lecture 1: Slide 8! World coordinate systems !
• To achieve device independence when drawing objects
we can deﬁne a world coordinate system. !
• This will deﬁne our drawing area in units that are suited
to the application: !
– meters !
– light years !
– microns !
– etc ! Graphics Lecture 1: Slide 9! Example !
We can give our window ‘World
Coordinates‘ and draw objects
using them. ! SetWindow(30, 10, 70, 50)
DrawLine(40, 3, 90, 30)
DrawLine(50, 60, 60, 40) ! Graphics Lecture 1: Slide 10! Normalisation!
To make the conversion!
using screen pixels!
we need a process of normalisation!
First we must ask the operating system* for the pixel
addresses of the...
View Full Document
This document was uploaded on 03/26/2014.
- Spring '14