MCA101: Computer Graphics Notes PDF
Document Details
Uploaded by PleasingStanza
Thapar Institute of Engineering and Technology
2024
Raghav B. Venkataramaiyer
Tags
Summary
These lecture notes cover Computer Graphics, focusing on MCA101. Topics include history, real-time constraints, terminology, the graphics pipeline, and an example using hot rods. The document is formatted as a presentation with diagrams and descriptions. This summary includes the year and the institution, CSED TIET Patiala India.
Full Transcript
mca101 : computeR gRaphics Raghav B. Venkataramaiyer CSED TIET Patiala India. August 3, 2024 outline 1 histoRy 2 constRaint of the Real-time 3 some teRminology 4 the gRaphics pipeline 5 hot Rod example outline 1 histoRy Applications Di...
mca101 : computeR gRaphics Raghav B. Venkataramaiyer CSED TIET Patiala India. August 3, 2024 outline 1 histoRy 2 constRaint of the Real-time 3 some teRminology 4 the gRaphics pipeline 5 hot Rod example outline 1 histoRy Applications Display Print 2 constRaint of the Real-time 3 some teRminology 4 the gRaphics pipeline 5 hot Rod example sKetchpad 1960 Image Courtesy: Youtube Flatland 1999 FiguRe: Flatland [MIEL99] plushie 2007 FiguRe: Plushie [MI07] See Also: Teaser @Youtube cityengine esRi 2012 Image Courtesy: Youtube See Also: Peter Wonka @3DGV outline 1 histoRy Applications Display Print 2 constRaint of the Real-time 3 some teRminology 4 the gRaphics pipeline 5 hot Rod example cathode Ray tube Image Courtesy: Wikipedia Monochrome (Raster), Colour (Raster), Direct-View Bistable Storage (Vector) nixie Tube (Variant of a Neon Lamp) Image Courtesy: Wikipedia flip-disc display Image Courtesy: Web Recently LCD Plasma (1995) LED OLED AMOLED E-Ink (Kindle) outline 1 histoRy Applications Display Print 2 constRaint of the Real-time 3 some teRminology 4 the gRaphics pipeline 5 hot Rod example RasteR Prehistoric, Ancient & Medieval Modern Clay Tablets Rotary Printing Press Wood Block Printing Offset Press Stencils/ Masks Screenprinting Seals and Stamps Dot matrix printing (DMP) Lithography Thermal Printing (Thermochromic) Flat-bed Printing Press Laser Printing vectoR Image Courtesy: Youtube See Also: Can I teach a robot to replicate a line art? [VKN20] outline 1 histoRy 2 constRaint of the Real-time 3 some teRminology 4 the gRaphics pipeline 5 hot Rod example Real time thRoughput >= 18 frames per second (FPS); RefResh Rate >= 24 Hz; Resolution A target of 24 FPS, will leave per pixel computation time of, 320 × 240 ≈ 77000 px → 543 ns 640 × 480 ≈ 0.3 MP → 135 ns 1024 × 768 ≈ 0.8 MP → 53 ns 1366 × 768 ≈ 1 MP → 40 ns Resolution Same with a 384 core GPU, 1440 × 900 ≈ 1.3 MP → 12.3 µs 1920 × 1280 ≈ 2.5 MP → 6.5 µs 3072 × 1920 ≈ 6 MP → 2.7 µs 8192 × 4320 ≈ 35 MP → 0.45 µs outline 1 histoRy 2 constRaint of the Real-time 3 some teRminology 4 the gRaphics pipeline 5 hot Rod example RepResentation The way a concept/ entity is represented in machine code. e.g. Colour as RGB; is just a mem block of 24-bits; Geometry as Polygonal Faces; Array of Vertex Data and Face Relations; Illumination as a physical model; Textures as 2D images; and so forth… tRansfoRmation Changing the view-point FiguRe: User View FiguRe: Camera View inteRpolation Estimating/ Computing the values in between two states. e.g. Points on a line segment are intermediate/ interpolated states between its two end points. visualisation To create a visible artefact corresponding to a concept. outline 1 histoRy 2 constRaint of the Real-time 3 some teRminology 4 the gRaphics pipeline 5 hot Rod example the gRaphics pipeline Data Input Uniform State Vertex Array (per-vertex data) Element Array (list of elements) Vertex Shader Triangle Assembly Rasterisation Fragment Shader Framebuffer Image Courtesy: Durian Software the gRaphics pipeline Data Input Vertex Shader input Per Vertex Data Uniform State output Position For Next Shader Triangle Assembly Rasterisation Fragment Shader Framebuffer Image Courtesy: Durian Software the gRaphics pipeline Data Input Vertex Shader Triangle Assembly Uses Element Array Rasterisation Fragment Shader Framebuffer Image Courtesy: Durian Software the gRaphics pipeline Data Input Vertex Shader Triangle Assembly Rasterisation Which element corresponds to which fragment Fragment Shader Framebuffer Image Courtesy: Durian Software the gRaphics pipeline Data Input Vertex Shader Triangle Assembly Rasterisation Fragment Shader input From Prev Shader Uniform State output Fragment Colour Framebuffer Image Courtesy: Durian Software the gRaphics pipeline Data Input Vertex Shader Triangle Assembly Rasterisation Fragment Shader Framebuffer Image Courtesy: Durian Software outline 1 histoRy 2 constRaint of the Real-time 3 some teRminology 4 the gRaphics pipeline Geometry Definition in OpenGL Vertex Shader Fragment Shader 5 hot Rod example thRee types point stRaight line planaR polygon thRee types point stRaight line planaR polygon thRee types point stRaight line planaR polygon Triangle Quad attRibutes elements outline 1 histoRy 2 constRaint of the Real-time 3 some teRminology 4 the gRaphics pipeline Geometry Definition in OpenGL Vertex Shader Fragment Shader 5 hot Rod example outline 1 histoRy 2 constRaint of the Real-time 3 some teRminology 4 the gRaphics pipeline Geometry Definition in OpenGL Vertex Shader Fragment Shader 5 hot Rod example outline 1 histoRy 2 constRaint of the Real-time 3 some teRminology 4 the gRaphics pipeline 5 hot Rod example pRoblem Given a straight line with vertex attributes: a) position in 2D coordinates; and b) temperature value; Draw the line with a heat gradient using a predefined heat map for colour. RefeRences I [MI07] Yuki Mori and Takeo Igarashi. “Plushie: An Interactive Design System for Plush Toys”. In: ACM Trans. Graph. 26.3 (2007) (see p. 6). [MIEL99] Elizabeth D. Mynatt, Takeo Igarashi, W. Keith Edwards, and Anthony LaMarca. “Flatland: New Dimensions in Office Whiteboards”. In: Proceedings of the SIGCHI Conference on Human Factors in Computing Systems. CHI ’99. New York, NY, USA: Association for Computing Machinery, 1999, pp. 346–353 (see p. 5). [VKN20] R. B. Venkataramaiyer, S. Kumar, and V. P. Namboodiri. “Can I Teach a Robot to Replicate a Line Art”. In: WACV. 2020 IEEE Winter Conference on Applications of Computer Vision (WACV). Aspen, CA, USA: IEEE, 2020, pp. 1922–1930 (see p. 15).