SlideShare uma empresa Scribd logo
1 de 18
Bridgekloud
Graphics Fundamentals
Lesson 2
Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311
Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311
FundamentalsOutline
 Historical perspective
 Model of a Computer - Memory & Graphics
 Devices
 Raster Model & Bitmaps
 Coordinates
 Drawing Spaces
 Colors
 Graphics Libraries
Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311
BriefHistory
 Teletypes(pre 1950s), DisplayTubes(postWW2),
CRTs(last half of 20th century), Flat Panels
(modern era)
 Size and Quality (eg resolution) driven by
economics (eg 640x320…1024x768…)
 Vector (circaWW2) & Raster/Bitmap models
 Devices & Human / Machine Interaction
 Memory and Processing Speed limitations
ComputerMemoryModel
Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311
 Main Memory
 Graphics memory
 Used to be limited to separate amount on eg graphics
card
 Modern idea is to partition main memory dynamically
(ie by software instruction)
 Modern idea is to map memory to the display
 Independent of display hardware type
ComputerMemoryModel cont…..
Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311
 CPU + Cache memory + Main memory
 Cache memory is fast but expensive so (still
often) only have small amount eg 512kBytes
available
 Main memory relatively plentiful (eg GBytes)
but slow
Memory&Graphics
Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311
Idea is that we can write programs that interact with
the graphical display device simply by writing to a
predetermined area of the computer’s memory
 Known as Bitmap graphics
 The bits are mapped to the pixels
 Flexible, portable software
 Independent of Hardware & Operating System
GraphicalDevices
Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311
Devices eg mouse, stereo glasses, tracker ball, light pen, touch
screen, 3d-wand, “rat”, sensor gloves, head tracker, iris tracker,…
Even Mouse varies in form factor and number of buttons
 Main Memory
 Graphics memory
 Used to be limited to separate amount on eg graphics
card
 Modern idea is to partition main memory dynamically (ie
by software instruction)
 Modern idea is to map memory to the display
 Independent of display hardware type
GraphicalDevices
Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311
 Mouse - most well known device
 Buttons, and scan movements
 Jargon ideas that have become common:
 Drag
 Click
 Double-Click
 Left -Click
 Main idea is to let you specify a location in a space eg x,y (or
x,y,z) coordinates
RasterModel-Pixels
Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311
Pixel or sometimes “pel” Picture Element
Each pixel is a sample that can be rendered as a dot or
rectangle on the screen
Often try to design them as squares but not always
 Might be implemented as small area of
phosphor on a monochrome monitor
 Or three areas of eg red, green and blue
phosphors for colour
 Or simple a transistor logic gate assembly on
a flat panel display
CoordinateSystems
Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311
 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)
Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311
CartesianCoordinates
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 egTV screens or
monitors
x
y
Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311
DrawingSpaceorCanvas
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]
Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311
ColoursinBrief
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
GraphicsLibrariesandpackages
Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311
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
Java Development Kit and Java 2D and Java 3D
libraries
GL and OpenGL (Graphics Library),VOGL
X11, DirectX, PHIGS,… and lots of others
Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311
JavaGraphicsProgramOutline
 A short example- MyProg01 draws a black
rectangle inside a white rectangle
 See the course web pages for these codes
 Use a text editor or your favourite text tool
(eg emacs or vi or notepad) to create
MyProg01.java
 Compile it using javac MyProg01.java
 Run using java Myprog01
Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311
Java GraphicsCodeFragment
// g2 is the Graphics2D object supplied by the system…
g2.setBackground( Color.white ); // set background colour
g2.clearRect( 0, 0, getWidth(), getHeight() ); // clear an area
g2.setColor( Color.black ); // set the drawing colour
g2.fillRect( 10, 10, 20, 20 ); // fill in a rectangle of that colour
g2.drawRect( 0, 0, getWidth()-1, getHeight()-1 ); // draw a border around everything
 More on how this works next lecture and at the
tutorials…
Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311
WhatMyProg01OutputLooksLike
Black rectangle inside a white area…
Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311
Summary
Graphics has a varied history
Very technology driven
Good advances in recent years with
adequate memory and processing
power
Primitives and library layers approach
is very common
 Note devices and
memory model
 Colour models and
drawing spaces are
important ideas for our
programs
 We will use the Java
Development Kit
graphics libraries and
primitives

Mais conteúdo relacionado

Mais procurados

Computer Graphics - Lecture 00 - Introduction
Computer Graphics - Lecture 00 - IntroductionComputer Graphics - Lecture 00 - Introduction
Computer Graphics - Lecture 00 - Introduction💻 Anton Gerdelan
 
Computer graphics.
Computer graphics.Computer graphics.
Computer graphics.ALIHAMID71
 
Computer Graphics
Computer GraphicsComputer Graphics
Computer GraphicsAdri Jovin
 
Lecture applications of cg
Lecture   applications of cgLecture   applications of cg
Lecture applications of cgavelraj
 
Computer Graphics
Computer GraphicsComputer Graphics
Computer GraphicsAnkur Soni
 
Computer graphics - Nitish Nagar
Computer graphics - Nitish NagarComputer graphics - Nitish Nagar
Computer graphics - Nitish NagarNitish Nagar
 
line drawing algorithms COMPUTER GRAPHICS & Graphical Programming
 line drawing algorithms COMPUTER GRAPHICS  & Graphical  Programming  line drawing algorithms COMPUTER GRAPHICS  & Graphical  Programming
line drawing algorithms COMPUTER GRAPHICS & Graphical Programming bridgekloud
 
3D Graphics & Rendering in Computer Graphics
3D Graphics & Rendering in Computer Graphics3D Graphics & Rendering in Computer Graphics
3D Graphics & Rendering in Computer GraphicsFaraz Akhtar
 
Monitors & workstation,Donald ch-2
Monitors & workstation,Donald ch-2Monitors & workstation,Donald ch-2
Monitors & workstation,Donald ch-2Iftikhar Ahmad
 
GRPHICS01 - Introduction to 3D Graphics
GRPHICS01 - Introduction to 3D GraphicsGRPHICS01 - Introduction to 3D Graphics
GRPHICS01 - Introduction to 3D GraphicsMichael Heron
 
Application of computer graphics and input devices
Application of computer graphics and input devicesApplication of computer graphics and input devices
Application of computer graphics and input devicesMani Kanth
 
Overview of graphics systems
Overview of  graphics systemsOverview of  graphics systems
Overview of graphics systemsJay Nagar
 
Introduction to computer graphics
Introduction to computer graphicsIntroduction to computer graphics
Introduction to computer graphicsAmandeep Kaur
 
Introduction to computer graphics
Introduction to computer graphicsIntroduction to computer graphics
Introduction to computer graphicsPartnered Health
 

Mais procurados (20)

Computer graphics, group 9, bba a
Computer graphics, group 9, bba aComputer graphics, group 9, bba a
Computer graphics, group 9, bba a
 
Overview of Computer Graphics
Overview of Computer GraphicsOverview of Computer Graphics
Overview of Computer Graphics
 
Computer Graphics - Lecture 00 - Introduction
Computer Graphics - Lecture 00 - IntroductionComputer Graphics - Lecture 00 - Introduction
Computer Graphics - Lecture 00 - Introduction
 
Computer graphics.
Computer graphics.Computer graphics.
Computer graphics.
 
fundamentals of Computer graphics(Computer graphics tutorials)
 fundamentals of Computer graphics(Computer graphics tutorials) fundamentals of Computer graphics(Computer graphics tutorials)
fundamentals of Computer graphics(Computer graphics tutorials)
 
Computer Graphics
Computer GraphicsComputer Graphics
Computer Graphics
 
Lecture applications of cg
Lecture   applications of cgLecture   applications of cg
Lecture applications of cg
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
 
Computer Graphics
Computer GraphicsComputer Graphics
Computer Graphics
 
Computer graphics - Nitish Nagar
Computer graphics - Nitish NagarComputer graphics - Nitish Nagar
Computer graphics - Nitish Nagar
 
line drawing algorithms COMPUTER GRAPHICS & Graphical Programming
 line drawing algorithms COMPUTER GRAPHICS  & Graphical  Programming  line drawing algorithms COMPUTER GRAPHICS  & Graphical  Programming
line drawing algorithms COMPUTER GRAPHICS & Graphical Programming
 
3D Graphics & Rendering in Computer Graphics
3D Graphics & Rendering in Computer Graphics3D Graphics & Rendering in Computer Graphics
3D Graphics & Rendering in Computer Graphics
 
Monitors & workstation,Donald ch-2
Monitors & workstation,Donald ch-2Monitors & workstation,Donald ch-2
Monitors & workstation,Donald ch-2
 
GRPHICS01 - Introduction to 3D Graphics
GRPHICS01 - Introduction to 3D GraphicsGRPHICS01 - Introduction to 3D Graphics
GRPHICS01 - Introduction to 3D Graphics
 
Application of computer graphics and input devices
Application of computer graphics and input devicesApplication of computer graphics and input devices
Application of computer graphics and input devices
 
Lcd bresenham
Lcd bresenhamLcd bresenham
Lcd bresenham
 
K10765 Matlab 3D Mesh Plots
K10765 Matlab 3D Mesh PlotsK10765 Matlab 3D Mesh Plots
K10765 Matlab 3D Mesh Plots
 
Overview of graphics systems
Overview of  graphics systemsOverview of  graphics systems
Overview of graphics systems
 
Introduction to computer graphics
Introduction to computer graphicsIntroduction to computer graphics
Introduction to computer graphics
 
Introduction to computer graphics
Introduction to computer graphicsIntroduction to computer graphics
Introduction to computer graphics
 

Semelhante a Ics2311 l02 Graphics fundamentals

An Introduction to Computer Science with Java .docx
An Introduction to  Computer Science with Java .docxAn Introduction to  Computer Science with Java .docx
An Introduction to Computer Science with Java .docxdaniahendric
 
Ics2311 l01 display technologies & interactive devices
Ics2311 l01 display technologies & interactive devicesIcs2311 l01 display technologies & interactive devices
Ics2311 l01 display technologies & interactive devicesbridgekloud
 
Computer Graphics Power Point using Open GL and C Programming
Computer Graphics Power Point using Open GL and C ProgrammingComputer Graphics Power Point using Open GL and C Programming
Computer Graphics Power Point using Open GL and C Programmingkemal678348
 
VisionizeBeforeVisulaize_IEVC_Final
VisionizeBeforeVisulaize_IEVC_FinalVisionizeBeforeVisulaize_IEVC_Final
VisionizeBeforeVisulaize_IEVC_FinalMasatsugu HASHIMOTO
 
Screensaver presentation
Screensaver presentationScreensaver presentation
Screensaver presentationMatt Dickson
 
Screensaver presentation
Screensaver presentationScreensaver presentation
Screensaver presentationMatt Dickson
 
Midterm revision 2022 without answer.pdf
Midterm revision 2022  without answer.pdfMidterm revision 2022  without answer.pdf
Midterm revision 2022 without answer.pdfAhmedSalah48055
 
Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...
Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...
Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...Lviv Startup Club
 
unit1_updated.pptx
unit1_updated.pptxunit1_updated.pptx
unit1_updated.pptxRYZEN14
 
Computer Graphics Project on Sinking Ship using OpenGL
Computer Graphics Project on Sinking Ship using OpenGLComputer Graphics Project on Sinking Ship using OpenGL
Computer Graphics Project on Sinking Ship using OpenGLSharath Raj
 
Digital Fabrication Studio.03 _Software @ Aalto Media Factory
Digital Fabrication Studio.03 _Software @ Aalto Media FactoryDigital Fabrication Studio.03 _Software @ Aalto Media Factory
Digital Fabrication Studio.03 _Software @ Aalto Media FactoryMassimo Menichinelli
 
mloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentmloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentDavid Galeano
 
Cadence design environment
Cadence design environmentCadence design environment
Cadence design environmentHoopeer Hoopeer
 
Minecraft in 500 lines of Python with Pyglet
Minecraft in 500 lines of Python with PygletMinecraft in 500 lines of Python with Pyglet
Minecraft in 500 lines of Python with PygletRichard Donkin
 

Semelhante a Ics2311 l02 Graphics fundamentals (20)

Mod 2 hardware_graphics.pdf
Mod 2 hardware_graphics.pdfMod 2 hardware_graphics.pdf
Mod 2 hardware_graphics.pdf
 
An Introduction to Computer Science with Java .docx
An Introduction to  Computer Science with Java .docxAn Introduction to  Computer Science with Java .docx
An Introduction to Computer Science with Java .docx
 
Task 2
Task 2Task 2
Task 2
 
Ics2311 l01 display technologies & interactive devices
Ics2311 l01 display technologies & interactive devicesIcs2311 l01 display technologies & interactive devices
Ics2311 l01 display technologies & interactive devices
 
Computer Graphics Power Point using Open GL and C Programming
Computer Graphics Power Point using Open GL and C ProgrammingComputer Graphics Power Point using Open GL and C Programming
Computer Graphics Power Point using Open GL and C Programming
 
VisionizeBeforeVisulaize_IEVC_Final
VisionizeBeforeVisulaize_IEVC_FinalVisionizeBeforeVisulaize_IEVC_Final
VisionizeBeforeVisulaize_IEVC_Final
 
Screensaver presentation
Screensaver presentationScreensaver presentation
Screensaver presentation
 
Screensaver presentation
Screensaver presentationScreensaver presentation
Screensaver presentation
 
lecture 4
 lecture 4 lecture 4
lecture 4
 
Midterm revision 2022 without answer.pdf
Midterm revision 2022  without answer.pdfMidterm revision 2022  without answer.pdf
Midterm revision 2022 without answer.pdf
 
Graphics file
Graphics fileGraphics file
Graphics file
 
Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...
Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...
Данило Ульянич “C89 OpenGL for ARM microcontrollers on Cortex-M. Basic functi...
 
unit1_updated.pptx
unit1_updated.pptxunit1_updated.pptx
unit1_updated.pptx
 
Computer Graphics Project on Sinking Ship using OpenGL
Computer Graphics Project on Sinking Ship using OpenGLComputer Graphics Project on Sinking Ship using OpenGL
Computer Graphics Project on Sinking Ship using OpenGL
 
Digital Fabrication Studio.03 _Software @ Aalto Media Factory
Digital Fabrication Studio.03 _Software @ Aalto Media FactoryDigital Fabrication Studio.03 _Software @ Aalto Media Factory
Digital Fabrication Studio.03 _Software @ Aalto Media Factory
 
cad_theory.ppt
cad_theory.pptcad_theory.ppt
cad_theory.ppt
 
AUTOCAD REPORT.pptx
AUTOCAD REPORT.pptxAUTOCAD REPORT.pptx
AUTOCAD REPORT.pptx
 
mloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentmloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game development
 
Cadence design environment
Cadence design environmentCadence design environment
Cadence design environment
 
Minecraft in 500 lines of Python with Pyglet
Minecraft in 500 lines of Python with PygletMinecraft in 500 lines of Python with Pyglet
Minecraft in 500 lines of Python with Pyglet
 

Último

Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)amitlee9823
 
Brookefield Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Brookefield Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Brookefield Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Brookefield Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...amitlee9823
 
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...RitikaRoy32
 
Peaches App development presentation deck
Peaches App development presentation deckPeaches App development presentation deck
Peaches App development presentation decktbatkhuu1
 
Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...amitlee9823
 
Editorial design Magazine design project.pdf
Editorial design Magazine design project.pdfEditorial design Magazine design project.pdf
Editorial design Magazine design project.pdftbatkhuu1
 
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779Delhi Call girls
 
SD_The MATATAG Curriculum Training Design.pptx
SD_The MATATAG Curriculum Training Design.pptxSD_The MATATAG Curriculum Training Design.pptx
SD_The MATATAG Curriculum Training Design.pptxjanettecruzeiro1
 
Stark Industries Marketing Plan (1).pptx
Stark Industries Marketing Plan (1).pptxStark Industries Marketing Plan (1).pptx
Stark Industries Marketing Plan (1).pptxjeswinjees
 
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...Call Girls in Nagpur High Profile
 
Booking open Available Pune Call Girls Kirkatwadi 6297143586 Call Hot Indian...
Booking open Available Pune Call Girls Kirkatwadi  6297143586 Call Hot Indian...Booking open Available Pune Call Girls Kirkatwadi  6297143586 Call Hot Indian...
Booking open Available Pune Call Girls Kirkatwadi 6297143586 Call Hot Indian...Call Girls in Nagpur High Profile
 
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...home
 
Booking open Available Pune Call Girls Nanded City 6297143586 Call Hot India...
Booking open Available Pune Call Girls Nanded City  6297143586 Call Hot India...Booking open Available Pune Call Girls Nanded City  6297143586 Call Hot India...
Booking open Available Pune Call Girls Nanded City 6297143586 Call Hot India...Call Girls in Nagpur High Profile
 
AMBER GRAIN EMBROIDERY | Growing folklore elements | Root-based materials, w...
AMBER GRAIN EMBROIDERY | Growing folklore elements |  Root-based materials, w...AMBER GRAIN EMBROIDERY | Growing folklore elements |  Root-based materials, w...
AMBER GRAIN EMBROIDERY | Growing folklore elements | Root-based materials, w...BarusRa
 
VIP Model Call Girls Kalyani Nagar ( Pune ) Call ON 8005736733 Starting From ...
VIP Model Call Girls Kalyani Nagar ( Pune ) Call ON 8005736733 Starting From ...VIP Model Call Girls Kalyani Nagar ( Pune ) Call ON 8005736733 Starting From ...
VIP Model Call Girls Kalyani Nagar ( Pune ) Call ON 8005736733 Starting From ...SUHANI PANDEY
 
CALL ON ➥8923113531 🔝Call Girls Aminabad Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Aminabad Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Aminabad Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Aminabad Lucknow best Night Fun serviceanilsa9823
 
Best VIP Call Girls Noida Sector 44 Call Me: 8448380779
Best VIP Call Girls Noida Sector 44 Call Me: 8448380779Best VIP Call Girls Noida Sector 44 Call Me: 8448380779
Best VIP Call Girls Noida Sector 44 Call Me: 8448380779Delhi Call girls
 
Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...
Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...
Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...babafaisel
 
The history of music videos a level presentation
The history of music videos a level presentationThe history of music videos a level presentation
The history of music videos a level presentationamedia6
 
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Service
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts ServiceVVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Service
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Servicearoranaina404
 

Último (20)

Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Nagavara ☎ 7737669865☎ Book Your One night Stand (Bangalore)
 
Brookefield Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Brookefield Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Brookefield Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Brookefield Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
UI:UX Design and Empowerment Strategies for Underprivileged Transgender Indiv...
 
Peaches App development presentation deck
Peaches App development presentation deckPeaches App development presentation deck
Peaches App development presentation deck
 
Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Basavanagudi Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
 
Editorial design Magazine design project.pdf
Editorial design Magazine design project.pdfEditorial design Magazine design project.pdf
Editorial design Magazine design project.pdf
 
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
Best VIP Call Girls Noida Sector 47 Call Me: 8448380779
 
SD_The MATATAG Curriculum Training Design.pptx
SD_The MATATAG Curriculum Training Design.pptxSD_The MATATAG Curriculum Training Design.pptx
SD_The MATATAG Curriculum Training Design.pptx
 
Stark Industries Marketing Plan (1).pptx
Stark Industries Marketing Plan (1).pptxStark Industries Marketing Plan (1).pptx
Stark Industries Marketing Plan (1).pptx
 
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
VVIP Pune Call Girls Hadapsar (7001035870) Pune Escorts Nearby with Complete ...
 
Booking open Available Pune Call Girls Kirkatwadi 6297143586 Call Hot Indian...
Booking open Available Pune Call Girls Kirkatwadi  6297143586 Call Hot Indian...Booking open Available Pune Call Girls Kirkatwadi  6297143586 Call Hot Indian...
Booking open Available Pune Call Girls Kirkatwadi 6297143586 Call Hot Indian...
 
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
Recommendable # 971589162217 # philippine Young Call Girls in Dubai By Marina...
 
Booking open Available Pune Call Girls Nanded City 6297143586 Call Hot India...
Booking open Available Pune Call Girls Nanded City  6297143586 Call Hot India...Booking open Available Pune Call Girls Nanded City  6297143586 Call Hot India...
Booking open Available Pune Call Girls Nanded City 6297143586 Call Hot India...
 
AMBER GRAIN EMBROIDERY | Growing folklore elements | Root-based materials, w...
AMBER GRAIN EMBROIDERY | Growing folklore elements |  Root-based materials, w...AMBER GRAIN EMBROIDERY | Growing folklore elements |  Root-based materials, w...
AMBER GRAIN EMBROIDERY | Growing folklore elements | Root-based materials, w...
 
VIP Model Call Girls Kalyani Nagar ( Pune ) Call ON 8005736733 Starting From ...
VIP Model Call Girls Kalyani Nagar ( Pune ) Call ON 8005736733 Starting From ...VIP Model Call Girls Kalyani Nagar ( Pune ) Call ON 8005736733 Starting From ...
VIP Model Call Girls Kalyani Nagar ( Pune ) Call ON 8005736733 Starting From ...
 
CALL ON ➥8923113531 🔝Call Girls Aminabad Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Aminabad Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Aminabad Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Aminabad Lucknow best Night Fun service
 
Best VIP Call Girls Noida Sector 44 Call Me: 8448380779
Best VIP Call Girls Noida Sector 44 Call Me: 8448380779Best VIP Call Girls Noida Sector 44 Call Me: 8448380779
Best VIP Call Girls Noida Sector 44 Call Me: 8448380779
 
Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...
Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...
Kala jadu for love marriage | Real amil baba | Famous amil baba | kala jadu n...
 
The history of music videos a level presentation
The history of music videos a level presentationThe history of music videos a level presentation
The history of music videos a level presentation
 
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Service
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts ServiceVVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Service
VVIP CALL GIRLS Lucknow 💓 Lucknow < Renuka Sharma > 7877925207 Escorts Service
 

Ics2311 l02 Graphics fundamentals

  • 1. Bridgekloud Graphics Fundamentals Lesson 2 Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311
  • 2. Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311 FundamentalsOutline  Historical perspective  Model of a Computer - Memory & Graphics  Devices  Raster Model & Bitmaps  Coordinates  Drawing Spaces  Colors  Graphics Libraries
  • 3. Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311 BriefHistory  Teletypes(pre 1950s), DisplayTubes(postWW2), CRTs(last half of 20th century), Flat Panels (modern era)  Size and Quality (eg resolution) driven by economics (eg 640x320…1024x768…)  Vector (circaWW2) & Raster/Bitmap models  Devices & Human / Machine Interaction  Memory and Processing Speed limitations
  • 4. ComputerMemoryModel Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311  Main Memory  Graphics memory  Used to be limited to separate amount on eg graphics card  Modern idea is to partition main memory dynamically (ie by software instruction)  Modern idea is to map memory to the display  Independent of display hardware type
  • 5. ComputerMemoryModel cont….. Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311  CPU + Cache memory + Main memory  Cache memory is fast but expensive so (still often) only have small amount eg 512kBytes available  Main memory relatively plentiful (eg GBytes) but slow
  • 6. Memory&Graphics Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311 Idea is that we can write programs that interact with the graphical display device simply by writing to a predetermined area of the computer’s memory  Known as Bitmap graphics  The bits are mapped to the pixels  Flexible, portable software  Independent of Hardware & Operating System
  • 7. GraphicalDevices Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311 Devices eg mouse, stereo glasses, tracker ball, light pen, touch screen, 3d-wand, “rat”, sensor gloves, head tracker, iris tracker,… Even Mouse varies in form factor and number of buttons  Main Memory  Graphics memory  Used to be limited to separate amount on eg graphics card  Modern idea is to partition main memory dynamically (ie by software instruction)  Modern idea is to map memory to the display  Independent of display hardware type
  • 8. GraphicalDevices Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311  Mouse - most well known device  Buttons, and scan movements  Jargon ideas that have become common:  Drag  Click  Double-Click  Left -Click  Main idea is to let you specify a location in a space eg x,y (or x,y,z) coordinates
  • 9. RasterModel-Pixels Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311 Pixel or sometimes “pel” Picture Element Each pixel is a sample that can be rendered as a dot or rectangle on the screen Often try to design them as squares but not always  Might be implemented as small area of phosphor on a monochrome monitor  Or three areas of eg red, green and blue phosphors for colour  Or simple a transistor logic gate assembly on a flat panel display
  • 10. CoordinateSystems Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311  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)
  • 11. Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311 CartesianCoordinates 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 egTV screens or monitors x y
  • 12. Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311 DrawingSpaceorCanvas 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]
  • 13. Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311 ColoursinBrief 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
  • 14. GraphicsLibrariesandpackages Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311 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 Java Development Kit and Java 2D and Java 3D libraries GL and OpenGL (Graphics Library),VOGL X11, DirectX, PHIGS,… and lots of others
  • 15. Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311 JavaGraphicsProgramOutline  A short example- MyProg01 draws a black rectangle inside a white rectangle  See the course web pages for these codes  Use a text editor or your favourite text tool (eg emacs or vi or notepad) to create MyProg01.java  Compile it using javac MyProg01.java  Run using java Myprog01
  • 16. Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311 Java GraphicsCodeFragment // g2 is the Graphics2D object supplied by the system… g2.setBackground( Color.white ); // set background colour g2.clearRect( 0, 0, getWidth(), getHeight() ); // clear an area g2.setColor( Color.black ); // set the drawing colour g2.fillRect( 10, 10, 20, 20 ); // fill in a rectangle of that colour g2.drawRect( 0, 0, getWidth()-1, getHeight()-1 ); // draw a border around everything  More on how this works next lecture and at the tutorials…
  • 17. Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311 WhatMyProg01OutputLooksLike Black rectangle inside a white area…
  • 18. Bridgekloud: https://www.bridgekloud.com Unit: Computer Graphics ICS2311 Summary Graphics has a varied history Very technology driven Good advances in recent years with adequate memory and processing power Primitives and library layers approach is very common  Note devices and memory model  Colour models and drawing spaces are important ideas for our programs  We will use the Java Development Kit graphics libraries and primitives