Docsity

Introduction to Interactive Computer Graphics | EECS 487, Lab Reports of Electrical and Electronics Engineering

Toggle sidebar
bg1
1
EECS 487: Interactive
Computer Graphics
Lecture 1
Introduction
Instructor
!!Sugih Jamin
!!Office: 4737 CSE
!!Office hours:
Tue 2-3, Wed 3-4, and by appt.
(but never right before lecture)
!!Tel: +1 734 763 1583
GSI
!!Manoj Rajagopalan
!!Office: 2808 CSE
!!Office hours:
Mon 3-4, Thu 9-10, and by appt.
!!Tel: +1 734 763 6563
!!Will lead lab sessions on mondays;
lectures will be wednesdays, fridays
!!Labs will be held in 1620 CSE
Required Readings
pf3
pf4
pf5

Partial preview of the text

Download Introduction to Interactive Computer Graphics | EECS 487 and more Lab Reports Electrical and Electronics Engineering in PDF only on Docsity!

1

EECS 487: Interactive

Computer Graphics

Lecture 1

Introduction

Instructor

!! Sugih Jamin

[email protected]

!! Office: 4737 CSE

!! Office hours:

Tue 2-3, Wed 3-4, and by appt.

(but never right before lecture)

!! Tel: +1 734 763 1583

GSI

!! Manoj Rajagopalan

!! Office: 2808 CSE

!! Office hours:

Mon 3-4, Thu 9-10, and by appt.

!! Tel: +1 734 763 6563

!! Will lead lab sessions on mondays;

lectures will be wednesdays, fridays

!! Labs will be held in 1620 CSE

Required Readings

Recommended Readings

!! OpenGL: real-time graphics API

-! www.opengl.org -! In particular: -! OpenGL specs -! The Red/Blue/Orange/… Books -! OpenGL Guides -! Many other books and sources

!! We don’t cover DirectX in this course (though

the fundamentals should be familiar)

Web Site and Forum !! Web site: http://www.eecs.umich.edu/~sugih/courses/eecs487/

-! Course grade composition -! Policy on Collaboration and Cheating -! Regrade and late days !! Lecture slides will be posted on web site after lecture !! Web site and forum are “required readings” !! Prerequisites -! EECS 281 -! C++ -! Linear algebra and basic geometry Overview !! Computer graphics -! “Much of graphics is just translating math directly into code. The cleaner the math, the cleaner the resulting code.” -- Shirley -! Modeling -! Describe scene and characters -! Triangles and other primitives -! Splines -! Sometimes generated by artists using an interactive modeling program (e.g., 3DSMax) -! Rendering -! Create the image -! Color each pixel -! Animation -! Make everything move -! time Course Information !! Mathematics for Computer Graphics -! points, vectors, matrices, linear algebra, -! triangles, barycentric coordinates, interpolation, -! 2D and 3D rigid transformations, 3D viewing and perspective !! Rendering -! scan line and ray tracing techniques, antialiasing -! illumination and reflection models for surfaces, -! shadowing, -! texture mapping, -! radiosity, -! GPU programming. !! Geometric Modeling: meshes, modeling hierarchies, splines, implicit curves and surfaces, procedural models, and user interfaces. !! Animation: principles of animation, keyframe animation

Shaders: programmable GPUs Raytracing, global illumination

!! Photorealistic rendering

Modeling that bottle

!! All of the objects to be rendered need to exist

!! They need to be

-! Specified -! Created -! Authored -! Animated -! Stored -! Acquired

!! Solids, meshes, smooth surfaces, triangles

!! Spline curves, line segments

Animation

Demo

Raster Graphics

!! Most of display devices are raster display

(as opposed to vector display)

-! Raster = a rectangular array of pixels -! Pixel = picture element -! indexed -! bottom-left pixel is (0,0) -! top-right is -! Image -! Rectangular array of pixels (i, j) (Nx − 1 , Ny − 1 ) Pixels !! Each pixel stores three values (R,G,B) -! Turns out mixing these three colors is enough -! More on that later !! LCD -! Passive-matrix or active-matrix -! one row at a time via the row electrodes -! individual pixels in the row on/off by appropriate voltages on the column electrodes -! Active matrix pixels keep their state between updates (resulting in brighter display) Pixel values

!! Each channel Red, Green, or Blue

-! Takes a range of values -! 24bit color means -! 3 bytes = one byte per channel -! 0..255 for a color -! 1 Byte per channel enough for display -! May not be enough if you want to perform computations -! Floating point values 0.0 to 1.

!! RGBA: is opacity

-! Useful for compositing: α ∈ ( 0 , 1 ) c = α ∗ cf + ( 1 − α) ∗ cb Raster Graphics Systems System Bus GPU CPU System memory Frame Buffer Video controller Monitor RGBA pixel: 4 Bytes B/W pixel: 1 bit { // copy bits from memory to frame buffer BitBlt(x0, y0, xn, yn, imagedata); }

Implicit 2D Lines

!! Line intersection and relative position:

-! if intersects at -! Given a line segment between and , a point at is to the right of the line segment if the slope , or -! , area below line , area above line y = m 1 x + b 1 y′^ = m 2 x′^ + b 2 (xi, yi), xi = (^) mb^21 −−bm^12 , yi = b^2 m m^11 −−bm^1 2 m^2 (x 1 , y 1 ) (x 1 , y 1 ) (x 2 , y 2 ) (x 2 , y 2 ) f (x, y) < 0 f (x, y) > 0 (x 0 , y 0 ) y 2 −y 0

x 2 −x 0 <^

y 1 −y 0 x 1 −x 0 (y 2 − y 0 )(x 1 − x 0 ) − (x 2 − x 0 )(y 1 − y 0 ) < 0 (x 0 , y 0 ) Parametric 2D Lines

!! Given two points and

the line can be described as

parametric form:

It can also be described as just a point o and

a vector d :

p 0 = (x 0 , y 0 ) p 1 =^ (x 1 ,^ y 1 ),

[ x y ] = [ x 0 + t(x 1 − x 0 ) y 0 + t(y 1 − y 0 ) ]

p(t) = p 0 + t(p 1 − p 0 )

p(t) = o + td

p 0 = p( 0 ) p 1 = p( 1 ) p( 1. 5 ) p( 0. 5 ) p(− 0. 5 ) Parametric line drawing

!! Convex combination of two points

-! remarkably general concept -! BLENDING -! Any positions, colors, vectors -! Interpolation ( 1 − t)p 0 + t ∗ p 1 p 0 p 1