GVC04 - GVC-432 Lecture 4 Ref Donald Hearn M Pauline Baker...

Info icon This preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
GVC-432 Lecture - 4 Ref: Donald Hearn & M. Pauline Baker , Computer Graphics Foley, van Dam, Feiner & Hughes, Computer Graphics Principles & Practice Dr Pavan Chakraborty IIIT-Allahabad Indian Institute of Information Technology - Allahabad
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Coordinate Systems Pixel Coordinate System - rows and columns Rectilinear Usually for graphics, we start at top left corner and work our way across and down Same as raster orientation Array[row][column] Row major used in C and C+ ( last index moves fastest in memory) Not all languages do it this way - eg Fortran uses column major (first index moves fastest) Indian Institute of Information Technology - Allahabad
Image of page 2
Cartesian Coordinates Often we use the Cartesian coordinate convention ie x,y coordinates (or x,y,z in 3D) and map this to our display Usually column corresponds to x, and -row corresponds to y This works if we know the max min values. Common values are eg 640 columns x 320 rows Or 1024x768 or better Aspect ratio is the ratio of these eg 4:3 - Chosen to suit the common display devices eg TV screens or monitors x y Indian Institute of Information Technology - Allahabad y
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Drawing Space or Canvas Coordinate Systems Drawing Primitives Library of utilities eg drawDot( int x, int y); Or drawLine( x1, y1, x2, y2 ); Usually we have “Primitive” Models for coordinate spaces and colours We do not want to write our application programs worrying about pixel resolutions We may have libraries that allow us to do so, but often they will support more general coordinates Eg real space “normalised” coordinates [0.0,1.0] Indian Institute of Information Technology - Allahabad
Image of page 4
Colours in Brief Red Green Blue is not the Only colour model although still most common We specify separate RGB values for each pixel They map to intensities All colours can be expressed as combination of these Sometimes also an “alpha” or transparency value These will conveniently pack into a computer word of 4 bytes, one byte for each entity 1 Byte gives us 256 values - hence numbers of colours Need not use this resolution Can also use Look-up tables to save memory Indian Institute of Information Technology - Allahabad
Image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Graphics Libraries and packages What is a graphics system? A package or Library that links to a Language or environment and lets us write programs that are independent of the graphics hardware and devices Java Development Kit and Java 2D and Java 3D libraries GL and OpenGL (Graphics Library), VOGL X11, DirectX, PHIGS,… and lots of others Indian Institute of Information Technology - Allahabad
Image of page 6
Summary Graphics has a varied history Very technology driven
Image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern