ebook img

An Introduction To Ray Tracing PDF

11.8 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview An Introduction To Ray Tracing

An Introdutcot ion RayT racing Version 1.2 January 28, 2019 Go to http://bit.ly/AITRT for more information. Made available free of charge thanks to the generosity of the authors and Academic Press (now Elsevier). Rights for this book were reverted to the editor, Andrew Glassner, by Elsevier, in 2019. With the other authors, he has re-released this version of the book under the Creative Commons Attribution 4.0 International (CC BY 4.0) license, https://creativecommons.org/licenses/by/4.0/ To summarize the key points, YOU ARE FREE TO: • Share — copy and redistribute the material in any medium or format • Adapt — remix, transform, and build upon the material for any purpose, even commercially. UNDER THE FOLLOWING TERMS: • Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use • No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits. An Introducttioo n RayT racing Editbeyd ANDREWS .G LASSNER XeroPxAR C 3333C oyotHei lRlo ad PalAol tCoA 94304 USA ACAEDMCI PRESS HarcBoruarJctvoe a novPiucbhl,i shers Lond·SoanDn i egNoe wY orBko ston · · Sydn·Te oyk yToo ronto · Page left intact; the license is now Creative Commons Attribution 4.0 International (CC BY 4.0), https://creativecommons.org/licenses/by/4.0/. See page 2 of this PDF for details. ACADEMIC PRESS LIMITED 24/O2va8lR oad,L ondonN WI 7DX UniteSdt ateEsd itiPounb lishbeyd ACADEMIC PRESSI NC. SanD iegoC,A 92101 Copyrig©ht 1 98by9 ACADEMIC PRESS LIMITED Thirdp rinti1ng9 90 Repdnte1d 991 Allr ighrtess ervNeod .p arotf t hibso okm ayb er eproducienad n yf ormb yp hotostmaitc,r ofilm, ora nyo themre answ,i thouwtr ittpeenr missiforonm t hep ublishers BritLiisbhr aCrayt alogiuniP nugb licaDtaitoan An Introducttioro any t racing. I.C omputesry stemGsr.a phidci splaTyhsr.e e-dimensiimoangaels . I.G lassneArn,d rew 006.6 ISBN0 -12-286160-4 § Thisb ooki sp rintoenda cid-fpraepee r Typesebty M athematiCcoamlp ositiSoent teLrtsd ,S alisbury PrintiendG reaBtr itaaitnt heU niversPirteys sC,a mbridge Contributors JameAsr voA,po lol ComputeIrcn .3,3 0 BielrilcRao adC,h elmsford, MA 01284,U SA. RoberCto okP,i xa3r24,0 KenreBrlv d, SRaafnae lC,A 94901U,SA . L. AndreSw. G lassnXeerr,o PxA RC,3 333C oyotHel ilR oadP,a ol Alto CA9 4304,U SA. EriHca iens3, D/EyeI cn.2,3 59N orthT rihpammerR oad,Ih taca,N Y 14805,U SA. PaHta nrahPaixna,r 3,2 40 KenrerBl vd.,Sa nR afaelC,A 94901U,SA PaulHSe.c kbe5r0t-8,7 E vansH al,lU C Berlkyee,B erlkyee,C A 947 20, USA. DaviKdi rAkp,o lol CmoputeIrcn .,3 30 BilelriRcoaa dC,h elmsfordM,A 01824, USA. (Currenatd rdes:s CalfiorniIan tsituotfeT echnology, ComputeSrc ien2c5e6- 80,P aasdenCaA, 9 1125,U SA.) Contents Conturtiobr.s . . . . . . . . . . . . . .v . . . . . . . . . . . . . . . . . . . . . Praecfe. . . . . . . . . . . . . . . . i.x . . . . . . . . . . . . . . . . . . . . . . . 1.A nO vervioefRw a yT racibnygA ndrew S.G lassne.r.. . EssenRtaiyaT lr aciAnlgg oritbhymE sir cH anies. . . . 3.3 . . 2. 3.A S urveoyfR ay-SurfIanctee rseAcltgioorni thms byP atH anarhan .. . . . . . . . . . 7.9 . . . . . . . . . . . . . . . . . . Surface PhfyosRria cyTs r acing 4. byA ndrewS .G lassne.r. . . . . . . . 1. 21. . . . . . . . . . . . . . . StochaSstamipcl inagn dD istribRuatyTe rda cing 5. byR obetr Cook. . . . . . . . . . .1 6 1. . . . . . . . . . . . . . . . . . L. AS urveoyfR ayT raciAncgc eleraTteicohnn iques 6. byJ amesA rvoa ndD aviKdik r . . . . . . . 2.01 . . . . . . . . . . . . WritiAn Rga yT racbeyrP aluS .H ekcbert. . . . . 2. 63. . . . . . 7. 8.A RayT raciBnigbo lgirapbhyyP aluS .H ecbketr andE ircH anies. . . . . . . . . . . 2.9 5. . . . . . . . . . . . . . . . . . . 9.A RayT raciGnlgo ssabryAy n drew S.G lassner 305 Inde.x . . . . . . . . . . . . . 32. 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . Preface Thiiss b oaoa kb ocuotm pugrthaeiprca snd, ctrheeao tfri eioasnlit miacg es. By'e ralwisemt eiaacnni' m atgheia istn diusihtsaibfnlorgmea p hotoogfr aph ar e,ta hler-ediimoensneacslnO ef.t hmea ncyo mptuetcehrn tihqhauatev se bedeenv eltocopr eeidam taeg peesr,ht ahapels g orciatl'hlarmeyt d r acing' is notwh meo spto puflomarar n ayp plniscP.aa toritftoh bee aoufrta yty r acing ise xittrsse immep l-iocnicyteoy ku n otwh nee cesbsaacrkuygn rdto,h e whotlhei nbge s cuamnm eidn ap uapr aapghr. Thibso obke gwiintsah ni tnrodutcott hiteoe nc hnoifrq autyer acing, decsrihboiawn ngd iwwtho yr .kF sollocwhianpdgte esrcsmr ainboyeft he theoraenptdri accadtlei tcoaaftil hl ceso mpallegitote.rh m Id'l itkose a syo metahbiohnuogtwr atyr accianmge abcooumtp utien r grhaipcasn,d thhobiwos o iknp articcaumtleoab reT .h eIn' blrli efly summatrhvieaz rei cohuasp ters. BIOTF H ITSOYR A Findaw iantygo c re'ahptoet loriesiatmiacgh'ea bsse eng ooaalfc omputer grapfhomirac nsyy e aGresn.ae lrglyr,a prheiscesa mrackhee rpsrb oyg ress firesxtma initnhgwe o ralrdo utnehdm ,an dt helno okaittn hgbe e st computeri-maggemenased rteado ta e.tId etf h ceo mpiumtaedgroe e slono'kt agso o(da envde nno wiu,ts udaolnel'syot n)ae,ss k',W ha'tmsi ssfirnotmgh e comppuitceetr?I u'nr btehigen nimnagnf,yae tuorfer se aslc ewneerse rapiindcllyiu cndo emdp uetneaertr-iegmdea sgS.o moetf heismeop vrements wermea dbeyn ottihnoagpt a qoujbee chtisdo jebe cbtesh itnhdes mh,i ny objheacvhteish ig lhgt,as nmda nsyru fahcaevasse u arcftee xtsuurcaehsa, woogdrenanM.i e thwoedrdsee veltoiopn ecdlt uhdeeesff eei cntctsoo m puter­ geantesercd eannesdsot , h oismea lgoesob keetdat nebdre tter. Onoef ftihorefts hte ssuecs cfeiusmla sgyen tmheetshisostd aswr itatenhd idferaot mhp eh ysltiiecrsa. Wt huerdnee siglneinpnshgey ss,ti rcaidsittsi on­ alpllyo otntp eadpt ehprea ttha kbeyn roafly isgs htta rattali ingsgho tu rce, thpeans stihnrgot uhlgeeh an nssd l igbhentyldoTy.h ipsr ocoefflso lso wing thlei rgahwytas cs a l'lareytd r ac.i ng' Sevceroamlp gurtaeprrh eiscesa trhcohuetgrhhtsath ts i ism uloaflt iigohnt phywsoiucblseda g oowda tyo c reaas tyen tihmeatTgiheci.w s aa sg ood idbeuaut,no ftrunaitne letyah r1el6 9y0c so mpuwteertroeoss lotwo make imagtehsa t bleotottkheeardtn h omsaed wei toht hcehre,a ipmearg e Precfea x. syntmheetsdhisRos.a tyr acfleiolnu gotf f a ovra,n ndo mtu caht tewnatsi on paitdoif to r syeevaerrsa.l Ast imween btya ,f luorfor tyha elrgt ohrmwise rdee veltoohp aendad llle kinodfis n teraesspteoicfrn tegpsa h lo taopsghr:re flencsst,hi aod,mo owtsion bloufrfs at-moovjbiencagtn ssd,o o n.B umto sotft heasleg orointlhym s workiensd p eccaisaaelns td,h euys uadlinld'wyto rvke rwye wlilt eha ch othTehruy.so wuo ufli.dan p di cewt iutsrhha wdsbo,u ntot raanrsepnocry , anotihmearwg ietr ehcf tl,ieb ounntom otibuolrn. Asc ompubteecramsmo erp eo wuelr,sf eietmi endc reaatstirnatgcloty i ve gob aackns di mutlhraeet paehl yc ssTi.hr ea tyr aaclignogrw iaetsxh tme nded anidm opvregdi,v iittnh gpe o wteohr a nmdalnedy fi refeknitn odfos p tical eefcfts. Todraayy tirosan ceti hnomegfo spto pualnpador w uetlre fchniitnqh uee s image sryenpterh:reei tsitoi ssisi mpelleet,ga, an nd eiamspilleym ented. Theres oamarese p eocft thrsee al twhorarattly rd a cdeoisntngh ' anvdelrey we(lolar ta l!al)so ft hwirsni gtP.ie rhtahmpeos s itm rptoaonmti ssairoe ns dfisufei nert-ref(leet.chg'te.lbi eoendsoi fcn ogl'ol riegdh tad ufrlrelofi.d ml e cabionnetatow hictaer ,pg eitvtihneg caap ripntekit, n a tn)cda ustics (ofculshietgdl, it khese h immerianttg hb eow tatvoofaes m sw immpiolno.)g Rayt racmianyog nd ea bye a blteoc reiamatgeei sn diussithiafnbrgloem photogorfra epashlcs e n-eosr p erhsaopmsoe t hmeorr,pe o wuelr f algorwiibtlehdl me veltootp aeikdtep sl aNceev.e rstsrh,ie gnlhoetmw a ny peopfeellte h artat yr aciison ngoe f t hbee sotv eriamlalsg yen thesis technwie'qevgu oe,ats n adsw orcko ntiiwtni ubleelsc oemveem no reeiff cient anrde lai.s tic HOWT HIBSO OK CTAOM EB E Thbioso iksr eav ianseded di vteerdso irfoe enfr emnactee rialf oaprnr epared inteonnsei-vcdeoa uyor nsr ea tyrc ainSgi.nt chebi oso gkr ew ofot uhte organiazngadot aioloftsn hc eo u.rI s'ledit kdoee scribe how the course came aboauntwd,h awtew erter ytiodn owg i tthhm iast e.r ial In 1l89a6tI,fe le tth tahtee w raas need antio tn rhoadvuceco tuoorrnsy e ratyr aacttih naegn nlmu eaetoifSnI gG GR(AtPShHpe e cIineatsleGt rr oup on CompuGtreahrpi cwsh,ii csph a rotft hAeC M,t hseo cioefct oym puter preosfsli.soE )naacyhe SaIrGG RAPmHou natv se lrayr cgoeenr fe,nc coevering manays peocfct osm pugtreairpc. hAs ni mrptoapnatro fte acShI GGRAPH coenrfeintsch epe r esenotfoa ntei-codonau yr Tsheeshr.ae v bee esne veral courastre esc SeInGGtR APrHesv iedweivnegl oipnmr eatnyrt asc fionrg exptesbr,uI tf letth aratty rc ainhagbd ecopmoep uelnaorut ghhta htee r shobuela dni tnroduccotuorrsye . Precfea xi Im ade pshoomcnelae la sn,gd a thteorgeedatg hreooruif p n ntaetrionally­ recogrneiszeeadir ntch hee rtfsopi reelsodeu nnret cw o urOsuegr.o fa rlo m thbee ngniiwnags tteoat coha 'ytpi'cS aIlGGRaAuPdHi eantrcies:t s, managsecnritsei,ps rtosgm,re a,ram snadn yoenlwesh eo iwnatse !r ested MosStI GGRcAoPuHri snecsls uodmkeei onfd'o curnsoet heasn'do eutdto attenSdienpecaseor. ftt h ree awseo nw teeraec thhcieon ugwr astseh tahte re wanso i notdrucmtaotreyar viaaillw aedb elcei,td owe rdi otueor wn .A s chairomfta hnce o urIsd ee,c itdoea dse kv erytoown rei otrei g,i nal high-qualfiotoryu cr o muanrtoset,ere isahanaldp pmiolsoytft hsep eakers hatdh tei maene dn etrgody o so. Thceo u'rnssa eme AwnIa nst rodTuoRc atTyir ocani. nI gt awg arse at succaetSs IsRG AGP'H 8i7nA nahe-iimt ownaeosf t htew o most heavilyc-oautrtTsehenresde .es dpi on1n8 9s7we a vse rgoyo, sd ow ed ecided to tghicevo eu argsiaenW .i tahs ligdhfiretfelcnyat ws etr epeatceodu rtshee atS IGGR'A88Pi HnA t ltaaWn.et ootkho ep porttoru enviaitnsyide m opvre thneoe ts. Thibso oikse sselnlttyhi neao tfeorsm S IGGRA'P8H8e d,i taendd improIvtie ndc.l auf dwee tsh isw negc uoldgne'ittn tthone o toerts h,a t didcno'mtae c rwoes:lsc lolpolra tgeosob,dl aacnkd--wihmiatgeae s, biobglriaapnhadyg ,l os.s ary A QUICLKO OAKT T HEC ONETNTS Asy oluo ookv etrhb eo orke,m emtbheartl etvohefel m tahtee vrainaels consaibdlfeyrr ocmh apttoce hra pStoemrce.h apatrevere srb ya saincd assulmiebt atclkeug nrdwo,hi olteh eexrpsye octutho a vseo mmea thematical experTihemeno crceeo. m pclheaxpa trfeeorm rso raed vanceydo cusa tnu dy: geqtu iftaweri jtuhts htle e msast hemcahtaipctaelr s. Thbeo obke gwiintsh 'Ano RfOa vTyer rcavi.inT eghw'oi pse ncihnagp ter assulmietbsta lcekg rforomut nhrdee adWeetr e.l la s hyonwti hmeeati gisc prdouc,ae ndd hotwrc airwnaogyr t kocs r eaanit mea Wghee.yn o 'uerd one readtihsnyi,go w uon 'btei anp osittwoir oianpt reo g,br uaymto suh obuel d ablteou nderrsattyar cnaidn dgi scsus,is nicolnumdoisontftg h oet her chapters. Wet hedni sc'usEssesn RtaiyaT lr acAilnggo rsi'Tt.hh efmnu damental operaitnai noryna t yr acing itsph rieon gstreeacrmto ifao r naw yi tahn ojbe.cB tecaiutss'uesc a hni mportsatneitpit i,s m rptoatnout n deristt and clrelaWye.s how thofnoi dwt hien steecrotfiar oany sweivteihrm arplto ant shapaenhsdo, tw ow ritnee ctehsceso amrpyup treorc edures. Morec omplikcianotdfoes jbd e catrdsei scuisn's ASe udr voefRy a y­ ObjeIcntt ersAelocgrttihim.oBs ne' camuosrceeo mpslheaxhp aevsme o re Preafce xii compmlaetxh emdaetsiicpcnrtasilt,o h mea tihnt hsiesc tiisnoe nc essarily morien vo.Yl ovdueo dnn'etet duo n derstandi nte hcvihesar ptytgotee hrti ng stairrnt aetydar ciinstgm 'o:r oeaf s prbionatgrhod e ylopu moontv ome or e advantcoepodin ccyseo,' u ev gosto mmeom euntm. Top ropceormlpyhu otwre a iynse trawcitts rhuf sawc,ee d isc'uuSrsfsa ce PhysfioRcra sTy r ac.iT nhgic'sh apgtievarel soot fb asiinocrf matthiaotn yo'ulln eetdoa ctugaeyltol uypr r ogrranumnisni gn,c lcuodlidonergs crip­ tiolnaswo,sfo pctsai,n sdu arcfceo loring. Iyfuo 'enr octa urlecf,o mpuetneerr-pagitceetdswu ircloln tlaooitfuns g ly aratcittfhsda not' bte lionanp gi ctduutreote h ,ne a teou dfr iglci otmaeprust antdh rea tyr acpironcgie tssWsee dl if.s tchuosassre t iafnahdco ttws oa v oid theimn' t SochSaaspmtliiacnn Dgdi isbturRtaeTydr ac.Ti hnmega 'teli rni a thcihsa pwtielrly ohuperil ceptsa uv roniads ty tahrdatnoti' bftea lcotans g in 'eralipsitceit.cu 'r 'AS urovefRya y TnrgAa cccieleTreacthinoianqd uderste'hsi ess esosuf e spe.Te hdbea sriatcyr aaclignogr ieisxt thrme smiemlpbylua etl ,es xot remely sl.oI w'tlsi skaeny gi',oT b uials da nddu npei,uc pka g raoifsnn a da,n d carirotyv etwroh eyroe'ue rb uiltdhdieun n:gd e ot hoivsea rno dv eagrna 'i. Thien uscttrairoceno srt rb,eu pcta uilnslflyoL wo.ot rfse sehaargsco hni en to waytsom akreat yr iancpgr ogrraufmnsas t Tehrbe.a nde wists h maotso tf thetseec hngirqeuacetoslm yp litchbaeat seidsc iamlaplnlyede l egraanyt tracailnggo. rT ihtegh omonde wisst hbaytu sitnhgem seet hyoodus can makaep icturfesa ttmehuracw nhi tsht raoirgwhattrefdc hniques. Byt htei myeor ue atchhee n odft hbeo oyko,'ul lb e rfeoahrdi yno tns 'WritAi RnagyT rearc.W' ritaip nrgo girusa smu aglrleyas tilmeypd li if fi yohua vape laofna ttoarcas k t,r uefc otbruu riltdhivena rgi poiueascn eds descrtihbeiiinenrrtg c oinonneIsnct. thc ihsa pwtee rg giovoeod r ag anization foarr ay-tprraocgitrnhagiamb st o tshi mtpbolu ei alnedda tseoyx t.eT nhde concaerpietl srl autswetidts ha mplei ntc hCoe pd reo gmrianlmgag nua.g e Wherceay no guo f ro moirnoerfa mti?Wo en,l lecahcahpi tne brto hoek comweisit thos wb ni bglriaopkheyy,et dh meta ot eirni actlhh aaptt yeoru. If wanmto rteh,ey nocu a cno nstuh'leaRt yT racBiilnbigo graphy'. yofuro gtehtme e ainnogfa w orydo,cu a pnr obfaibinlitdyn ' AR ay If TrcaiGnlgo s'sH.ae rrwyeeg idvee finiftomiroo sontfts h iem porttearnmts useidnt his bsooomkoe,t htpeelrrtu mhssya otmu i gfhmtid nt hleir taeture. Somoeft heen itearsri el lusstirnaatcfteeaer ldt l,hi iassb oookng raphics! ACKONWLEGDEMENTS ThSe! GGRcAoPuHar nsde btohorikes p rtehsceeon mtb iefnfroetodsfm a ny peopTlhea.nt koMs i eka nCdh eBraii lwehyot, o geatmdhiesnrti etrheed

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.