Introduction to Computer Graphics
Introduction to Computer Graphics CMPS 160
Popular in Course
Popular in ComputerScienence
This 16 page Class Notes was uploaded by Dr. Elyssa Ratke on Monday September 7, 2015. The Class Notes belongs to CMPS 160 at University of California - Santa Cruz taught by Staff in Fall. Since its upload, it has received 55 views. For similar materials see /class/182280/cmps-160-university-of-california-santa-cruz in ComputerScienence at University of California - Santa Cruz.
Reviews for Introduction to Computer Graphics
Report this Material
What is Karma?
Karma is the currency of StudySoup.
Date Created: 09/07/15
Eddy Chandra CMPS 160 1 What is an illumination model And brie y describes the three basic illumination models An illumination model is used to calculate the color of an illuminated position on the surface of an object Theree basic illumination models Ambient Light The general brightness level for a scene A surface that is not directly exposed to a light source may still be visible due to the re ected light from nearby objects that are illuminated Diffuse Re ection Surfaces that are rough or grainy tend to scatter the re ected light in all directions and the surfaces appears equally bright from any viewing angle This scattered light is called diffuse re ection Specular Re ection In addition to diffuse light scattering some of the re ected light is concentrated into a highlight or bright spot called specular re ection This highlighting effect is more pronounced on shiny surfaces than on dull surfaces 1 45wers can kick 19666 0 Qa eSdLM 07 Uogd 0110 50 Obiqu 5 ofm L UMnailed Mode7 Enlcpq aesc o 4H tam Jaw 14qu Matt up 2 41 min5d we 15 571 UCxVCLoi Hmjt Can Lo MaxH7 litimzr mam 3404M iwmlmrilam Mabcb if Via 3 33 4 wwdfefu A v a 31qu qu i J XSL amp39 U1 J S L H E 43qu i H J i Zl sat11939 Q gays 4Q QAQZE 39W 7ampA co b polht 15 46quot 7TCCM39JV4 MjAChaoUA 43 7ComDu7 mm M 7 h i 39J 71Uv w 7 7 7 quot 17777 ihn hir 7 77WW i 1254w4z 51393947591 Za fslxllgg 7 f 39 W Vquot ow scene n Wi at 7 PM 7 39 SLAonc 40573 A I 1242 M L V W Q Hat 7 W nt ccwl fc cgli t 77 i i If 77 A V A Lsnec mswpp 7 7a 9 jmnlaa 7 77777 Uog Are07 wwlb xpacf quotCM sl gtww J7 177 W5 aH iob mkjj 7 vr 7 1 7 k i 7 77 7 k W T 77 7 7 7 7 7 7 7 7 7 7 77 7 i7J7 Note The following quetifer to th abov image a What technique was used to render this image b What are the advantages to using the technique from part a c How many lights were used in this world How do you know d We discussed in class that o en times when rendering objects with this technique you end up with a bunch of tiny holes Explain what causes the holes as well as a possible solution to this issue Solutions a Raytracing b Raytracing is very adept at producing spheres and it also makes things such as the re ection that we see in this image relatively easy Other algorithms would depend on drawing many many many small triangles to simulate the curves of a sphere but ray tracing sends rays from your eye to the points on all of the objects that you can see in the world and determines their color by in turn sending out other rays from that point to see what else in the world affects it lights other re ective objects etc Also we can manipulate our ray tracing algorithm on a somewhat case by case basisthe number of rays and they direction they go in can depend on the properties of the object of the current point and if we know where the important things in a scene are we can send the rays from our point to those things speci cally to ensure that we don t miss out on any important details r l p I f 139 5 seitlp Cw Kellerow RegentM 9adWS ome q it easy W 01 if Cof ftOl 3908 cM74r lm neededs r C Only one We know because there is only one specular re ection ie bright Spot b b lm 39 39 474 Sad rte 0 an I 12 l 415 d The holes ome when a ray om a li t source misses the s ace f the object due to oating point error and accidentally goes inside the object thus making the object s surface have a hole where the light was supposed to hit This problem can easily be remedied by adding a very small epsilon offset in the direction of the normal for each point the light hits 1 5 dad M 7J6le A Miquot 0W LL Carer01478 0365 M H L armada Wadi194425 quotix 31734 M ICQ a mhqlt1 M at graze Lavz a W 7 M F W0 7 11 source T Ben Samuel Draw a picture of a ray of light hitting and bouncing of surfaces with the following types of re ections In which direction does the light go Describe a kind of material for each re ection type Ideal Specular Rough Specular Diffuse Ma lm l 0350B ymolbc galWk J orvL lt17 Clix1 lm Mixton Wagum s MaulY6 33 Dr quotW796 JFOML al 5 0 fanWhoa Magnum lm l ulch H 45ch A day WWW quotWm son a whim won 3 AL M Cw K was Qa jrml agging Awake Jody 4 quQ r lpblmqugth lr h arimrt x 0095 donr 039 AWL93 as 3 x f mwt b I111 1 31 t quot A mmmrmggggx f m w i quot i Jr KW wooxa er 37 33 aim W t 9mm l39 x 1 Given an HSV color with H 240 Blue S 5 V 8 a What is its RGB value K R T616512 7 60 52m G lawn Jim b What is its CMY value l C Brendan Seaman Answer Key a b MKJ Q 7amp1 Fmodeg LW The hue is pure blue so B will take the value V 8 Saturation is 5 so R and G will be half of B which is 4 R4 G4 133 C 1 4 M 1 4 Y 1 8 C6 M6 Y2 715 3 Q 3005 7M7Wm 72m wU mmo Egg W7 H60 LizaW in 726le Chg nor 4k w Ox erQVMmim er O Hum Llom J0 J l imk R90V J AQ M cn47 74 HA3 OM50 5 O I 7 Coma CGLNKUMJ DAR85am 1439 l A 39 wvuun u b L 7 V V x r V I 39 thmwc V I 1113o39 395 am x 1 Ma 1 U 1 A HUZ CATDCLCR L mmAaRIn gm abut 6 OVexVULn 2m HM Lve a mpmm I MMaw Haw Cam 1 44m 10 Pm vmzd gad L m U l quot i Y A QASW 4won biz 11 bypass flrml Q FSJ39IMB VH7 46W A 4 L J W l t l Eda 39m gdes39Hm al UN Make yon 148 0 4W Wear all was I a We A11 14Mk W a Dunc b 3 choosl h zzL0 more Smmgofeg 39 mmJ F a J Am r K M d Masaix baf e rm94 paf Yw clcw39 M k 4 0 4 33 AMOS116 wA mm mmth AoaS vl aWwf r Mg 1 a ma 2x mmde 393 5mm saxle 0 J 8351 wit 14x05 RpmC Emit4195 so no WA 41444956 lt armm Liu vx COHOLQ39IWGI CchlmlOLI CV Ctg Carreslpov cfvxq binaiy rdkvvfck lvl I raa Bequpg 120 a oe fixu V qv and ObjecSgCorml X 33 kw Lg a 3 2quot W T quotz zt V J ragpmka 13 in Write a function drawPlanetSystemCPlanet planet that will put all the planets and moons in the correct places Planets should orbit within the X2 plane You don39t need to worry about updating their positions just handle drawing them in their current state You have access to glRotate ngranslate drawSphereCfloat radius MPI contains the value of pi Here s the Planet structure struct Planet float orbitPosition from 00 to 10 the orbit progress of the planet 05 would be half way around float orbitRadius this planet39s distance from the sun float radius the radius of the planet Planet moon a pointer to this planet39s moon Here s an example of how the function could be used void drawSolarSystemC glLoadIdentityC gluLookAtC30 S 15 set up our eye point looking at the center of the solar system 0 O 0 0 1 0 drawFlamingSunC draw the sun at the origin drawPlanetSystemCearth drawPlanetSystemCmars drawPlanetSystemComicronPerseiEight Note that a moon is just another Planet and could have a moon of its own Take this into consideration when answering