home *** CD-ROM | disk | FTP | other *** search
/ gondwana.ecr.mu.oz.au/pub/ / Graphics.tar / Graphics / papers / musg89a.ms.Z / musg89a.ms
Text File  |  1991-02-06  |  89KB  |  3,956 lines

  1. .\" "Prisms and Rainbows"
  2. .\" F. K. Musgrave
  3. .\" print using -ms macros (e.g., "troff -ms filename")
  4. .\"
  5. .\" @(#)tmac.vgrind 1.2 86/10/08 SMI; from UCB 4.3 beta
  6. 'ss 23
  7. 'ds _ \d\(mi\u
  8. 'ps 9p
  9. 'vs 10p
  10. 'ds - \(mi
  11. 'ds / \\h'\\w' 'u-\\w'/'u'/
  12. 'ds /* \\h'\\w' 'u-\\w'/'u'/*
  13. 'bd B 3
  14. 'bd S B 3
  15. 'nr cm 0
  16. 'nf
  17. 'de vH
  18. 'ev 2
  19. 'if t 'if !\nv 'tl '\-\-''\-\-'
  20. 'ft 1
  21. 'sp .35i
  22. 'tl '\s14\f3\\*(=F\fP\s0'\\*(=H'\f3\s14\\*(=F\fP\s0'
  23. 'sp .25i
  24. 'ft 1
  25. \f2\s12\h'\\n(.lu-\w'\\*(=f'u'\\*(=f\fP\s0\h'|0u'
  26. .sp .05i
  27. 'ev
  28. 'ds =G \\*(=F
  29. ..
  30. 'de vF
  31. 'ev 2
  32. 'sp .35i
  33. 'tl '\f2\\*(=M''Page % of \\*(=G\fP'
  34. 'bp
  35. 'ev
  36. 'ft 1
  37. 'if \\n(cm=1 'ft 2
  38. ..
  39. 'de ()
  40. 'pn 1
  41. ..
  42. 'de +C
  43. 'nr cm 1
  44. 'ft 2
  45. 'ds +K
  46. 'ds -K
  47. ..
  48. 'de -C
  49. 'nr cm 0
  50. 'ft 1
  51. 'ds +K \f3
  52. 'ds -K \fP
  53. ..
  54. '+C
  55. '-C
  56. 'am +C
  57. 'ne 3
  58. ..
  59. 'de FN
  60. \f2\s14\h'\\n(.lu-\w'\\$1'u'\\$1\fP\s0\h'|0u'\c
  61. .if \\nx .tm \\$1 \\*(=F \\n%
  62. 'ds =f \&...\\$1
  63. ..
  64. 'de FC
  65. .if \\nx .tm \\$1 \\*(=F \\n%
  66. 'ds =f \&...\\$1
  67. ..
  68. 'de -F
  69. 'rm =f
  70. ..
  71. 'ft 1
  72. 'lg 0
  73. '-F
  74. .EQ
  75. .nr 99 \n(.s
  76. .nr 98 \n(.f
  77. .ps 10
  78. .ft 2
  79. .ps 12
  80. .ft 2
  81. .ps \n(99
  82. .ft \n(98
  83. .EN
  84. .GO
  85. .nr PS 12
  86. .nr VS 14
  87. .\"--------------------
  88. .\" As required for the typesetting of the paper
  89. .nr PO 1.5i
  90. .nr LL 4.25i
  91. .nr HM 1.25i
  92. .nr FM 1.25i
  93. .ds CH \\n(PN
  94. .ds CF
  95. .\" end Grad Div
  96. .\"--------------------
  97. .\" Revision Bar - places vertical bar in right margin beside text
  98. .\"    between .RB and .RE.
  99. .\" Change to '.mc' to get rid of revision bars.
  100. .de RB
  101. .\" .mc \s+9\(br\s-9
  102. .mc
  103. ..
  104. .de RE
  105. .mc
  106. ..
  107. .\" end revision Bar
  108. .\"--------------------
  109. .LP
  110. .ls 1
  111. .sp 3
  112. .TL
  113. .nr VS 16
  114. Prisms and Rainbows:
  115. a Dispersion Model for Computer Graphics
  116. .nr VS 14
  117. .AU
  118. F. Kenton Musgrave
  119. .AI
  120. .\" F. Kenton Musgrave
  121. Department of Mathematics
  122. Yale University
  123. Box 2155 Yale Station
  124. New Haven, Connecticut 06520
  125. .sp 1
  126. .AB
  127. .ce
  128. \fBAbstract\fR
  129. .PP
  130. \fIDispersion\fR is the spreading of refracted light
  131. into its component colors or spectrum.
  132. A model of refraction including dispersion
  133. is developed using the techniques of distributed ray tracing.
  134. Two models of the rainbow, one empirical or impressionistic, the 
  135. other purely physical, are developed using the results of the
  136. dispersion model.
  137. The problem of representing the spectrum of monochromatic colors
  138. using the rgb primaries of the graphics monitor is addressed.
  139. .PP
  140. KEYWORDS:  Dispersion, refraction, rainbow, stochastic sampling,
  141. distributed ray tracing, spectrum, color gamut.
  142. .NH
  143. INTRODUCTION
  144. .PP
  145. Treatment of refraction in computer graphics has generally lacked 
  146. \fIdispersion\fR, or the spreading of refracted light into its component
  147. colors or \fIspectrum\fR.
  148. While convincing simulations of transparent objects can be had without
  149. taking dispersion into account,
  150. the inclusion of dispersion makes available additional realism and beauty.
  151. We will present a dispersion model, within the \fIray tracing\fR paradigm,
  152. and develop a physical model of the
  153. rainbow based on that dispersion model.
  154. .PP
  155. Modelling of dispersion entails the solution of at least two distinct problems:
  156. the integration and reconstruction 
  157. of the \fIpower spectrum\fR of light by frequency,
  158. and the display of the spectrum of \fImonochromatic\fR colors on a standard
  159. graphics display device.
  160. The first problem may be treated as another aspect of the \fIdistributed ray
  161. tracing\fR model of Cook\*([.4\*(.]
  162. et. al. or as an enhancement to the \fIrendering equation\fR of Kajiya.\*([.11\*(.]
  163. The problem of reproducing monochromatic colors is in the realm of color science\*([.27\*(.]
  164. and an approximate solution can be had through the use of \fImetamers\fR,
  165. though this problem remains an open area of research.
  166. .PP
  167. Perhaps the most spectacular example of dispersion at work in nature is the 
  168. rainbow.
  169. The arc of the rainbow is a result of the geometry of the reflection and
  170. refraction of light in raindrops;
  171. the wonderful colors of the rainbow are the result of dispersion
  172. of sunlight in refraction through water.
  173. With a working dispersion model and some geometric optics, one can 
  174. produce an efficient rainbow model for use in ray-raced and Z-buffered
  175. rendering schemes.
  176. We will present two rainbow models, one impressionistic or empirical\*([.8\*(.]
  177. and another purely physical and therefore, quite true to nature.
  178. .NH
  179. PROBLEM STATEMENT
  180. .PP
  181. The Cook-Torrance\*([.3\*(.]
  182. shading model
  183. takes into account the frequency of light waves in reflection
  184. from surfaces as a function of the index of refraction.
  185. What has been missing from the generally available literature is
  186. a model of refraction which takes into account 
  187. the frequency of light.
  188. Such a dispersion model has been called for in previous research.\*([.11,\|13\*(.]
  189. Some dispersion models have apparently been developed, but not published.\*([.9,\|25\*(.]
  190. Thomas\*([.23\*(.]
  191. published a brief description of a dispersion model,
  192. but did not develop atmospheric rainbows;
  193. unfortunately, Thomas' article remains obscure.
  194. The work presented here
  195. was developed independently of Thomas, and differs in most important respects.
  196. .PP
  197. The model of dispersion developed here is an extension of distributed
  198. ray tracing\*([.24\*(.]
  199. and thereby uses the Monte Carlo integration techniques of Cook.\*([.6\*(.]
  200. Integration of a continuous function by a finite number of \fIpoint samples\fR
  201. can lead to two types of \fIaliasing\fR, that of the frequency content of
  202. the signal being sampled
  203. and that introduced in the reconstruction of the signal from the samples.
  204. It is important to note that we are not concerned with the former type
  205. of aliasing, which is 
  206. the result of sampling the signal at a rate below the Nyquist limit.
  207. Color \fImetamerism\fR generally obviates the need for very accurate
  208. reproduction of the exact curve of the power spectrum;
  209. nuances of the power distribution are important only in the interaction
  210. of light with attenuating media and reflecting surfaces and can 
  211. safely be ignored in our model.
  212. What \fBis\fR important is our reconstruction of the spectrum
  213. from the point samples taken.
  214. As our approximation of the
  215. integral of the power spectrum will be a set of discrete samples, 
  216. our reconstruction will be prone to appearing as a set of discrete,
  217. overlapping colors.
  218. This situation is analogous to that of \fItemporal aliasing\fR,
  219. where a moving ball may be sampled (imaged) at several points in time
  220. in an attempt to get motion blur and, upon reconstruction,
  221. appear as several overlapping, translucent circles.
  222. .PP
  223. In the case of dispersion, if we were to view a white disk on a 
  224. black background through a prism, we might see several
  225. overlapping disks of different colors. 
  226. We call this effect \fIspectral aliasing\fR, and use the \fIjittering\fR 
  227. technique of stochastic sampling to defeat it.
  228. Jittering is random placement of the actual sample points within fixed
  229. sample intervals, which intervals may themselves be regularly spaced.
  230. Jittering adds noise to the image and turns the distinct overlapping
  231. images into a speckled blur, which looks a bit like spray paint.
  232. .PP
  233. The advantage of this noisy reconstruction of the image is that the 
  234. human visual system tends to blur the noise together into a smooth 
  235. continuum, whereas it 
  236. actually enhances the sharp edges in the non-noisy images for a most 
  237. displeasing effect.
  238. Such sharp discontinuities in intensity or color, or the rate of change
  239. thereof, manifest the phenomenon known as \fIMach banding\fR.
  240. Mach bands are an artifact of the edge-enhancement caused by \fIlateral
  241. inhibition\fR in the retina.\*([.7\*(.]
  242. When constructing and sampling our representation of the spectrum
  243. we must be aware of the potential for trouble with color Mach banding.
  244. The practical significance of this problem will be addressed in section 4.1.
  245. .PP
  246. Whatever colors we choose for representation, we will fail to
  247. accurately reproduce the spectrum.
  248. The graphics monitor has three \fIprimary\fR colors with which to work,
  249. none of which is fully \fIsaturated\fR.
  250. Even if we have three fully saturated or monochromatic primaries
  251. (as are available with laser raster projection systems),
  252. all other monochromatic colors can only be approximated,
  253. with varying degrees of \fIdesaturation\fR.
  254. Our task, then, is to represent the entire visible spectrum of monochromatic
  255. colors as best we can,
  256. using three desaturated primaries and avoiding Mach bands.
  257. Furthermore, the sum of the samples chosen to represent the spectrum must,
  258. at full intensity, be the value of full-intensity white.
  259. If not, image samples
  260. involving dispersion will be tinted and/or shifted in intensity.
  261. .PP
  262. Given a working model of dispersion and an acceptable representation of the 
  263. spectrum, one looks for applications.
  264. One striking application is a physical model of the rainbow.
  265. Rainbows are the result of the interaction of sunlight with very large 
  266. numbers of raindrops in the atmosphere.
  267. The sheer number of particles (raindrops) involved,
  268. multiplied by the number of samples required to integrate the spectrum,
  269. makes a direct simulation of nature quite impractical.
  270. By modelling of the interaction of light with a single ideal raindrop,
  271. we can acquire a table of data which represents the situation in nature.
  272. This table may be used subsequently in the rendering process to replicate
  273. the effects of a rainbow in nature, with very good computational efficiency.
  274. We will describe such an approach in Section 4.3.
  275. .NH
  276. PREVIOUS WORK
  277. .NH 2
  278. Physics of Refraction
  279. .PP
  280. Refraction is an effect of the differing speed of light in dissimilar
  281. materials.
  282. The speed of light in a material determines its \fIoptical density\fR
  283. which, surprisingly, is not exactly proportional to its mass
  284. density.
  285. As light slows down upon entering a medium of greater optical density,
  286. the wave trains are compressed.
  287. Thus, while frequency is preserved, wavelength is not.
  288. (It thereby behooves one to be careful \fBnot\fR to use "frequency" and
  289. "wavelength" interchangeably when discussing refraction and dispersion.)
  290. .PP
  291. The \fIangle of refraction\fR, or the angle of the change in path for light,
  292. was related mathematically to the net change in \fIindex of refraction\fR
  293. by Willebrord Snell
  294. .\" (and, independently, by Rene Descartes)
  295. in 1621 by Snell's Law:\*([.1,\|19\*(.]
  296. .EQ I (1)
  297. .nr 99 \n(.s
  298. .nr 98 \n(.f
  299. .ps 12
  300. .ft 2
  301. .ds 11 "\(*y
  302. .ds 12 "\f11\fP
  303. .as 11 \v'18u'\s-3\*(12\s+3\v'-18u'
  304. .ds 12 "\|
  305. .as 11 "\*(12
  306. .ds 12 "\f1sin\fP
  307. .as 11 "\*(12
  308. .ds 12 "\(*h
  309. .ds 13 "i
  310. .as 12 \v'18u'\s-3\*(13\s+3\|\v'-18u'
  311. .as 11 "\*(12
  312. .ds 12 "\ 
  313. .as 11 "\*(12
  314. .ds 12 "\(eq
  315. .as 11 "\*(12
  316. .ds 12 "\ 
  317. .as 11 "\*(12
  318. .ds 12 "\(*y
  319. .ds 13 "\f12\fP
  320. .as 12 \v'18u'\s-3\*(13\s+3\v'-18u'
  321. .as 11 "\*(12
  322. .ds 12 "\|
  323. .as 11 "\*(12
  324. .ds 12 "\f1sin\fP
  325. .as 11 "\*(12
  326. .ds 12 "\(*h
  327. .ds 13 "t
  328. .as 12 \v'18u'\s-3\*(13\s+3\|\v'-18u'
  329. .as 11 "\*(12
  330. .ds 11 \x'0'\f2\s12\*(11\s\n(99\f\n(98\x'3u'
  331. .nr 11 \w'\*(11'
  332. .nr MK 0
  333. .if 90>\n(.v .ne 90u
  334. .rn 11 10
  335. \*(10
  336. .ps \n(99
  337. .ft \n(98
  338. .EN
  339. .nr 99 \n(.s
  340. .nr 98 \n(.f
  341. .rm 12 
  342. .as 12 "where 
  343. .ps 12
  344. .ft 2
  345. .ds 13 "\(*y
  346. .ds 14 "\f11\fP
  347. .as 13 \v'18u'\s-3\*(14\s+3\v'-18u'
  348. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98\x'3u'
  349. .as 12 \*(13
  350. .ps \n(99
  351. .ft \n(98
  352. .as 12 " and 
  353. .ps 12
  354. .ft 2
  355. .ds 13 "\(*y
  356. .ds 14 "\f12\fP
  357. .as 13 \v'18u'\s-3\*(14\s+3\v'-18u'
  358. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98\x'3u'
  359. .as 12 \*(13
  360. .ps \n(99
  361. .ft \n(98
  362. .as 12 " are the indices of refraction
  363. .ps \n(99
  364. .ft \n(98
  365. \*(12
  366. of the two transmissive media,
  367. .nr 99 \n(.s
  368. .nr 98 \n(.f
  369. .rm 12 
  370. .ps 12
  371. .ft 2
  372. .ds 13 "\(*h
  373. .ds 14 "i
  374. .as 13 \v'18u'\s-3\*(14\s+3\|\v'-18u'
  375. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98\x'3u'
  376. .as 12 \*(13
  377. .ps \n(99
  378. .ft \n(98
  379. .as 12 " is the angle of incidence
  380. .ps \n(99
  381. .ft \n(98
  382. \*(12
  383. .nr 99 \n(.s
  384. .nr 98 \n(.f
  385. .rm 12 
  386. .as 12 "and 
  387. .ps 12
  388. .ft 2
  389. .ds 13 "\(*h
  390. .ds 14 "t
  391. .as 13 \v'18u'\s-3\*(14\s+3\|\v'-18u'
  392. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98\x'3u'
  393. .as 12 \*(13
  394. .ps \n(99
  395. .ft \n(98
  396. .as 12 " is the angle of transmission.
  397. .ps \n(99
  398. .ft \n(98
  399. \*(12
  400. .nr 99 \n(.s
  401. .nr 98 \n(.f
  402. .rm 12 
  403. .as 12 "As the refractive index 
  404. .ps 12
  405. .ft 2
  406. .ds 13 "\(*y
  407. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  408. .as 12 \*(13
  409. .ps \n(99
  410. .ft \n(98
  411. .as 12 " is a function of the frequency of the light
  412. .ps \n(99
  413. .ft \n(98
  414. \*(12
  415. ray, the angle of refraction is also a function of frequency.
  416. Thus arises dispersion.
  417. .NH 2
  418. Physics of Dispersion
  419. .PP
  420. .\" Dispersion was first 
  421. .\" described by Sir Isaac Newton in his 1704 work \fIOpticks\fR.
  422. .\" Newton discovered that white light is really a sum of the spectrum of 
  423. .\" monochromatic colors, and that index of refraction is a function of color.
  424. The proportion of
  425. change of index of refraction with frequency in a material is termed 
  426. \fIdispersive power\fR.
  427. .nr 99 \n(.s
  428. .nr 98 \n(.f
  429. .rm 12 
  430. .as 12 "The dispersive power 
  431. .ps 12
  432. .ft 2
  433. .ds 13 "w
  434. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  435. .as 12 \*(13
  436. .ps \n(99
  437. .ft \n(98
  438. .as 12 " of a material is defined as the ratio
  439. .ps \n(99
  440. .ft \n(98
  441. \*(12
  442. of the dispersion between the F and C Fraunhofer lines*
  443. .FS
  444. * The Fraunhofer lines are \fIemission lines\fR of hydrogen.  
  445. They represent monochromatic light at various visible wavelengths:
  446. the C line is at 656.3 nm (red), D is at 589.3 nm (yellow), and F is at 486.1 nm
  447. (violet).
  448. .FE
  449. to the mean deviation, i.e., the deviation for the D Fraunhofer line.\*([.20,\|21,\|26\*(.]
  450. Thus
  451. .EQ I (2)
  452. .nr 99 \n(.s
  453. .nr 98 \n(.f
  454. .ps 12
  455. .ft 2
  456. .ds 11 "w
  457. .ds 12 "\ 
  458. .as 11 "\|\*(12
  459. .ds 12 "\(eq
  460. .as 11 "\*(12
  461. .ds 12 "\ 
  462. .as 11 "\*(12
  463. .ds 12 "\f1(\fP
  464. .ds 13 "\(*y
  465. .ds 14 "F
  466. .as 13 \v'18u'\s-3\*(14\s+3\|\v'-18u'
  467. .as 12 "\*(13
  468. .ds 13 "\(mi
  469. .as 12 "\*(13
  470. .ds 13 "\(*y
  471. .ds 14 "C
  472. .as 13 \v'18u'\s-3\*(14\s+3\|\v'-18u'
  473. .as 12 "\*(13
  474. .ds 13 "\f1)\fP
  475. .as 12 "\*(13
  476. .ds 13 "\f1(\fP
  477. .ds 14 "\(*y
  478. .ds 15 "D
  479. .as 14 \v'18u'\s-3\*(15\s+3\|\v'-18u'
  480. .as 13 "\*(14
  481. .ds 14 "\(mi
  482. .as 13 "\*(14
  483. .ds 14 "\f11\fP
  484. .as 13 "\*(14
  485. .ds 14 "\f1)\fP
  486. .as 13 "\*(14
  487. .nr 12 \w'\s12\*(12'
  488. .nr 13 \w'\s12\*(13'
  489. .nr 14 \n(12
  490. .if \n(13>\n(14 .nr 14 \n(13
  491. .nr 14 \n(14+\s12.5m\s0
  492. .ds 12 \v'51u'\h'\n(14u-\n(13u/2u'\*(13\
  493. \h'-\n(13u-\n(12u/2u'\v'-111u'\*(12\
  494. \h'-\n(14u-\n(12u/2u+.1m'\v'39u'\l'\n(14u-.2m'\h'.1m'\v'21u'
  495. .as 11 "\*(12
  496. .ds 11 \x'0'\x'0-45u'\f2\s12\*(11\s\n(99\f\n(98\x'54u'
  497. .nr 11 \w'\*(11'
  498. .nr MK 0
  499. .if 201>\n(.v .ne 201u
  500. .rn 11 10
  501. \*(10
  502. .ps \n(99
  503. .ft \n(98
  504. .EN
  505. .nr 99 \n(.s
  506. .nr 98 \n(.f
  507. .rm 12 
  508. .as 12 "where 
  509. .ps 12
  510. .ft 2
  511. .ds 13 "\(*y
  512. .ds 14 "F
  513. .as 13 \v'18u'\s-3\*(14\s+3\|\v'-18u'
  514. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98\x'3u'
  515. .as 12 \*(13
  516. .ps \n(99
  517. .ft \n(98
  518. .as 12 ", 
  519. .ps 12
  520. .ft 2
  521. .ds 13 "\(*y
  522. .ds 14 "C
  523. .as 13 \v'18u'\s-3\*(14\s+3\|\v'-18u'
  524. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98\x'3u'
  525. .as 12 \*(13
  526. .ps \n(99
  527. .ft \n(98
  528. .as 12 ", and 
  529. .ps 12
  530. .ft 2
  531. .ds 13 "\(*y
  532. .ds 14 "D
  533. .as 13 \v'18u'\s-3\*(14\s+3\|\v'-18u'
  534. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98\x'3u'
  535. .as 12 \*(13
  536. .ps \n(99
  537. .ft \n(98
  538. .as 12 " 
  539. .ps \n(99
  540. .ft \n(98
  541. \*(12
  542. are the refractive indices of the 
  543. material at the frequencies of the F, C, and D Fraunhofer lines, respectively.
  544. .nr 99 \n(.s
  545. .nr 98 \n(.f
  546. .rm 12 
  547. .as 12 ".\" In the optical industry, the reciprocal of the dispersive power 
  548. .ps 12
  549. .ft 2
  550. .ds 13 "\(*n
  551. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  552. .as 12 \*(13
  553. .ps \n(99
  554. .ft \n(98
  555. .as 12 " 
  556. .ps \n(99
  557. .ft \n(98
  558. \*(12
  559. .nr 99 \n(.s
  560. .nr 98 \n(.f
  561. .rm 12 
  562. .as 12 ".\" (the "
  563. .ps 12
  564. .ft 2
  565. .ds 13 "\(*n
  566. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  567. .as 12 \*(13
  568. .ps \n(99
  569. .ft \n(98
  570. .as 12 "-value" or "Abbe number") 
  571. .ps \n(99
  572. .ft \n(98
  573. \*(12
  574. .\" is more commonly used:
  575. .\" .[
  576. .\" Besancon
  577. .\" .]
  578. .\" .EQ I (3)
  579. .\" nu ~=~ 1 over w ~=~ {( eta sub D - 1 )} over {( eta sub F - eta sub C )}
  580. .\" .EN
  581. .\" .LP
  582. .\" This Abbe number can range from about 16, for methylene iodide, to 
  583. .\" over 95, for calcium fluoride.
  584. .\" (The respective dispersive powers are approximately 0.06 to 0.01.)
  585. .\" For optical glasses the Abbe number
  586. .\" can range from 19.7, for the densest silicate flint
  587. .\" glass, to 70.0, for light phosphate crown glass.
  588. .\" The Abbe number for water is 55.7.
  589. .PP
  590. Just as optical density is independent of mass density, dispersive power
  591. is independent of optical density.
  592. The reason is that dispersion is modulated by \fIabsorption bands\fR in
  593. materials, not by optical density.
  594. .KF
  595. .sp 2i
  596. .nr PS 10
  597. .QP
  598. .ls 1
  599. .ce
  600. Figure 3.1  The dispersion curve at an absorption band.
  601. .nr PS 12
  602. .PP
  603. .rs
  604. .KE
  605. .\" .LP
  606. Note also that the plot of refractive index vs. frequency is not perfectly
  607. straight, but curved.
  608. This is an important factor in the development of a model of dispersion.
  609. .PP
  610. There have been many attempts to formulate a quantitative relation 
  611. .nr 99 \n(.s
  612. .nr 98 \n(.f
  613. .rm 12 
  614. .as 12 "of refractive index 
  615. .ps 12
  616. .ft 2
  617. .ds 13 "\(*y
  618. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  619. .as 12 \*(13
  620. .ps \n(99
  621. .ft \n(98
  622. .as 12 " to frequency or
  623. .ps \n(99
  624. .ft \n(98
  625. \*(12
  626. .nr 99 \n(.s
  627. .nr 98 \n(.f
  628. .rm 12 
  629. .as 12 "wavelength 
  630. .ps 12
  631. .ft 2
  632. .ds 13 "\(*l
  633. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  634. .as 12 \*(13
  635. .ps \n(99
  636. .ft \n(98
  637. .as 12 ", none entirely successful.
  638. .ps \n(99
  639. .ft \n(98
  640. \*(12
  641. The best known and most general is that of Sellmeier:\*([.1\*(.]
  642. .EQ I (3)
  643. .nr 99 \n(.s
  644. .nr 98 \n(.f
  645. .ps 12
  646. .ft 2
  647. .ds 11 "\(*y
  648. .ds 12 "\f12\fP
  649. .as 11 \v'-27u'\s-3\*(12\s+3\v'27u'
  650. .ds 12 "\ 
  651. .as 11 "\*(12
  652. .ds 12 "\(eq
  653. .ds 12 \k(97\*(12
  654. .as 11 "\*(12
  655. .ds 12 "\ 
  656. .as 11 "\*(12
  657. .ds 12 "\f11\fP
  658. .as 11 "\*(12
  659. .ds 12 "\|
  660. .as 11 "\*(12
  661. .ds 12 "\(pl
  662. .as 11 "\*(12
  663. .ds 12 "\|
  664. .as 11 "\*(12
  665. .ds 12 \s12\v'.3m'\s+5\(*S\s-5\v'-.3m'\s12
  666. .as 11 "\*(12
  667. .ds 12 "b
  668. .ds 13 "\(*l
  669. .ds 14 "\f12\fP
  670. .as 13 \v'-27u'\s-3\*(14\s+3\v'27u'
  671. .as 12 "\|\*(13
  672. .ds 13 "c
  673. .ds 14 "\f12\fP
  674. .as 13 \v'-27u'\s-3\|\*(14\s+3\v'27u'
  675. .ds 14 "\|
  676. .as 13 "\*(14
  677. .ds 14 "\(mi
  678. .as 13 "\*(14
  679. .ds 14 "\|
  680. .as 13 "\*(14
  681. .ds 14 "\(*l
  682. .ds 15 "\f12\fP
  683. .as 14 \v'-27u'\s-3\*(15\s+3\v'27u'
  684. .as 13 "\*(14
  685. .nr 12 \w'\s12\*(12'
  686. .nr 13 \w'\s12\*(13'
  687. .nr 14 \n(12
  688. .if \n(13>\n(14 .nr 14 \n(13
  689. .nr 14 \n(14+\s12.5m\s0
  690. .ds 12 \v'63u'\h'\n(14u-\n(13u/2u'\*(13\
  691. \h'-\n(13u-\n(12u/2u'\v'-105u'\*(12\
  692. \h'-\n(14u-\n(12u/2u+.1m'\v'21u'\l'\n(14u-.2m'\h'.1m'\v'21u'
  693. .as 11 "\*(12
  694. .ds 11 \x'0'\x'0-39u'\f2\s12\*(11\s\n(99\f\n(98\x'48u'
  695. .nr 11 \w'\*(11'
  696. .nr MK 1
  697. .if 189>\n(.v .ne 189u
  698. .rn 11 10
  699. \*(10
  700. .ps \n(99
  701. .ft \n(98
  702. .EN
  703. .nr 99 \n(.s
  704. .nr 98 \n(.f
  705. .rm 12 
  706. .as 12 "where 
  707. .ps 12
  708. .ft 2
  709. .ds 13 "b
  710. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  711. .as 12 \*(13
  712. .ps \n(99
  713. .ft \n(98
  714. .as 12 " is a constant characteristic of the material,
  715. .ps \n(99
  716. .ft \n(98
  717. \*(12
  718. .nr 99 \n(.s
  719. .nr 98 \n(.f
  720. .rm 12 
  721. .ps 12
  722. .ft 2
  723. .ds 13 "c
  724. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  725. .as 12 \*(13
  726. .ps \n(99
  727. .ft \n(98
  728. .as 12 " is an idealized absorption wavelength of the material 
  729. .ps \n(99
  730. .ft \n(98
  731. \*(12
  732. (corresponding to a spectral \fIabsorption band\fR)
  733. where the index of refraction is infinite,
  734. and the summation is over all absorption bands in the material.
  735. Simpler equations which are suitable for limited extents within
  736. the spectrum are:\*([.1\*(.]
  737. .EQ I (Cauchy)
  738. .nr 99 \n(.s
  739. .nr 98 \n(.f
  740. .ps 12
  741. .ft 2
  742. .ds 11 "\(*y
  743. .ds 12 "\ 
  744. .as 11 "\*(12
  745. .ds 12 "\(eq
  746. .nr 11 \w'\s12\*(11'
  747. .ds 11 \h'|\n(97u-\n(11u'\*(11
  748. .as 11 "\*(12
  749. .ds 12 "\ 
  750. .as 11 "\*(12
  751. .ds 12 "a
  752. .ds 13 "\(*l
  753. .ds 14 "\f10\fP
  754. .as 13 \v'-27u'\s-3\*(14\s+3\v'27u'
  755. .nr 12 \w'\s12\*(12'
  756. .nr 13 \w'\s12\*(13'
  757. .nr 14 \n(12
  758. .if \n(13>\n(14 .nr 14 \n(13
  759. .nr 14 \n(14+\s12.5m\s0
  760. .ds 12 \v'63u'\h'\n(14u-\n(13u/2u'\*(13\
  761. \h'-\n(13u-\n(12u/2u'\v'-105u'\*(12\
  762. \h'-\n(14u-\n(12u/2u+.1m'\v'21u'\l'\n(14u-.2m'\h'.1m'\v'21u'
  763. .as 11 "\*(12
  764. .ds 12 "\|
  765. .as 11 "\*(12
  766. .ds 12 "\(pl
  767. .as 11 "\*(12
  768. .ds 12 "\|
  769. .as 11 "\*(12
  770. .ds 12 "b
  771. .ds 13 "\(*l
  772. .ds 14 "\f12\fP
  773. .as 13 \v'-27u'\s-3\*(14\s+3\v'27u'
  774. .nr 12 \w'\s12\*(12'
  775. .nr 13 \w'\s12\*(13'
  776. .nr 14 \n(12
  777. .if \n(13>\n(14 .nr 14 \n(13
  778. .nr 14 \n(14+\s12.5m\s0
  779. .ds 12 \v'63u'\h'\n(14u-\n(13u/2u'\*(13\
  780. \h'-\n(13u-\n(12u/2u'\v'-105u'\*(12\
  781. \h'-\n(14u-\n(12u/2u+.1m'\v'21u'\l'\n(14u-.2m'\h'.1m'\v'21u'
  782. .as 11 "\*(12
  783. .ds 12 "\|
  784. .as 11 "\*(12
  785. .ds 12 "\(pl
  786. .as 11 "\*(12
  787. .ds 12 "\|
  788. .as 11 "\*(12
  789. .ds 12 "c
  790. .ds 13 "\(*l
  791. .ds 14 "\f14\fP
  792. .as 13 \v'-27u'\s-3\*(14\s+3\v'27u'
  793. .nr 12 \w'\s12\*(12'
  794. .nr 13 \w'\s12\*(13'
  795. .nr 14 \n(12
  796. .if \n(13>\n(14 .nr 14 \n(13
  797. .nr 14 \n(14+\s12.5m\s0
  798. .ds 12 \v'63u'\h'\n(14u-\n(13u/2u'\*(13\
  799. \h'-\n(13u-\n(12u/2u'\v'-105u'\*(12\
  800. \h'-\n(14u-\n(12u/2u+.1m'\v'21u'\l'\n(14u-.2m'\h'.1m'\v'21u'
  801. .as 11 "\*(12
  802. .ds 12 "\|
  803. .as 11 "\*(12
  804. .ds 12 "\(pl
  805. .as 11 "\*(12
  806. .ds 12 "\|
  807. .as 11 "\*(12
  808. .ds 12 "\v'-.3m'\ .\ .\ .\ \v'.3m'
  809. .as 11 "\*(12
  810. .ds 11 \x'0'\x'0-27u'\f2\s12\*(11\s\n(99\f\n(98\x'48u'
  811. .nr 11 \w'\*(11'
  812. .nr MK 1
  813. .if 177>\n(.v .ne 177u
  814. .rn 11 10
  815. \*(10
  816. .ps \n(99
  817. .ft \n(98
  818. .EN
  819. .EQ I (Hartmann)
  820. .nr 99 \n(.s
  821. .nr 98 \n(.f
  822. .ps 12
  823. .ft 2
  824. .ds 11 "\(*y
  825. .ds 12 "\ 
  826. .as 11 "\*(12
  827. .ds 12 "\(eq
  828. .nr 11 \w'\s12\*(11'
  829. .ds 11 \h'|\n(97u-\n(11u'\*(11
  830. .as 11 "\*(12
  831. .ds 12 "\ 
  832. .as 11 "\*(12
  833. .ds 12 "\f11\fP
  834. .as 11 "\*(12
  835. .ds 12 "\|
  836. .as 11 "\*(12
  837. .ds 12 "\(pl
  838. .as 11 "\*(12
  839. .ds 12 "\|
  840. .as 11 "\*(12
  841. .ds 12 "b
  842. .ds 13 "\f1(\fP
  843. .ds 14 "c
  844. .as 13 "\*(14
  845. .ds 14 "\|
  846. .as 13 "\|\*(14
  847. .ds 14 "\(mi
  848. .as 13 "\*(14
  849. .ds 14 "\|
  850. .as 13 "\*(14
  851. .ds 14 "\(*l
  852. .as 13 "\*(14
  853. .ds 14 "\f1)\fP
  854. .as 13 "\*(14
  855. .nr 12 \w'\s12\*(12'
  856. .nr 13 \w'\s12\*(13'
  857. .nr 14 \n(12
  858. .if \n(13>\n(14 .nr 14 \n(13
  859. .nr 14 \n(14+\s12.5m\s0
  860. .ds 12 \v'51u'\h'\n(14u-\n(13u/2u'\*(13\
  861. \h'-\n(13u-\n(12u/2u'\v'-93u'\*(12\
  862. \h'-\n(14u-\n(12u/2u+.1m'\v'21u'\l'\n(14u-.2m'\h'.1m'\v'21u'
  863. .as 11 "\*(12
  864. .ds 11 \x'0'\x'0-27u'\f2\s12\*(11\s\n(99\f\n(98\x'36u'
  865. .nr 11 \w'\*(11'
  866. .nr MK 1
  867. .if 165>\n(.v .ne 165u
  868. .rn 11 10
  869. \*(10
  870. .ps \n(99
  871. .ft \n(98
  872. .EN
  873. .EQ I (Conrady)
  874. .nr 99 \n(.s
  875. .nr 98 \n(.f
  876. .ps 12
  877. .ft 2
  878. .ds 11 "\(*y
  879. .ds 12 "\ 
  880. .as 11 "\*(12
  881. .ds 12 "\(eq
  882. .nr 11 \w'\s12\*(11'
  883. .ds 11 \h'|\n(97u-\n(11u'\*(11
  884. .as 11 "\*(12
  885. .ds 12 "\ 
  886. .as 11 "\*(12
  887. .ds 12 "a
  888. .as 11 "\*(12
  889. .ds 12 "\|
  890. .as 11 "\|\*(12
  891. .ds 12 "\(pl
  892. .as 11 "\*(12
  893. .ds 12 "\|
  894. .as 11 "\*(12
  895. .ds 12 "b
  896. .ds 13 "\(*l
  897. .nr 12 \w'\s12\*(12'
  898. .nr 13 \w'\s12\*(13'
  899. .nr 14 \n(12
  900. .if \n(13>\n(14 .nr 14 \n(13
  901. .nr 14 \n(14+\s12.5m\s0
  902. .ds 12 \v'51u'\h'\n(14u-\n(13u/2u'\*(13\
  903. \h'-\n(13u-\n(12u/2u'\v'-93u'\*(12\
  904. \h'-\n(14u-\n(12u/2u+.1m'\v'21u'\l'\n(14u-.2m'\h'.1m'\v'21u'
  905. .as 11 "\*(12
  906. .ds 12 "\|
  907. .as 11 "\*(12
  908. .ds 12 "\(pl
  909. .as 11 "\*(12
  910. .ds 12 "\|
  911. .as 11 "\*(12
  912. .ds 12 "c
  913. .ds 13 "\(*l
  914. .ds 14 "\f17\fP
  915. .ds 15 "\f12\fP
  916. .nr 14 \w'\s9\*(14'
  917. .nr 15 \w'\s9\*(15'
  918. .nr 16 \n(14
  919. .if \n(15>\n(16 .nr 16 \n(15
  920. .nr 16 \n(16+\s9.5m\s0
  921. .ds 14 \v'39u'\h'\n(16u-\n(15u/2u'\*(15\
  922. \h'-\n(15u-\n(14u/2u'\v'-69u'\*(14\
  923. \h'-\n(16u-\n(14u/2u+.1m'\v'15u'\l'\n(16u-.2m'\h'.1m'\v'15u'
  924. .as 13 \v'-66u'\s-3\*(14\s+3\v'66u'
  925. .nr 12 \w'\s12\*(12'
  926. .nr 13 \w'\s12\*(13'
  927. .nr 14 \n(12
  928. .if \n(13>\n(14 .nr 14 \n(13
  929. .nr 14 \n(14+\s12.5m\s0
  930. .ds 12 \v'132u'\h'\n(14u-\n(13u/2u'\*(13\
  931. \h'-\n(13u-\n(12u/2u'\v'-174u'\*(12\
  932. \h'-\n(14u-\n(12u/2u+.1m'\v'21u'\l'\n(14u-.2m'\h'.1m'\v'21u'
  933. .as 11 "\*(12
  934. .ds 11 \x'0'\x'0-27u'\f2\s12\*(11\s\n(99\f\n(98\x'117u'
  935. .nr 11 \w'\*(11'
  936. .nr MK 1
  937. .if 246>\n(.v .ne 246u
  938. .rn 11 10
  939. \*(10
  940. .ps \n(99
  941. .ft \n(98
  942. .EN
  943. .EQ I (Hertzberger)
  944. .nr 99 \n(.s
  945. .nr 98 \n(.f
  946. .ps 12
  947. .ft 2
  948. .ds 11 "\(*y
  949. .ds 12 "\ 
  950. .as 11 "\*(12
  951. .ds 12 "\(eq
  952. .nr 11 \w'\s12\*(11'
  953. .ds 11 \h'|\n(97u-\n(11u'\*(11
  954. .as 11 "\*(12
  955. .ds 12 "\ 
  956. .as 11 "\*(12
  957. .ds 12 "a
  958. .as 11 "\*(12
  959. .ds 12 "\|
  960. .as 11 "\|\*(12
  961. .ds 12 "\(pl
  962. .as 11 "\*(12
  963. .ds 12 "\|
  964. .as 11 "\*(12
  965. .ds 12 "b
  966. .as 11 "\*(12
  967. .ds 12 "\(*l
  968. .ds 13 "\f12\fP
  969. .as 12 \v'-27u'\s-3\*(13\s+3\v'27u'
  970. .as 11 "\|\*(12
  971. .ds 12 "\|
  972. .as 11 "\*(12
  973. .ds 12 "\(pl
  974. .as 11 "\*(12
  975. .ds 12 "\|
  976. .as 11 "\*(12
  977. .ds 12 "c
  978. .as 11 "\*(12
  979. .ds 12 "L
  980. .as 11 "\*(12
  981. .ds 12 "\|
  982. .as 11 "\|\*(12
  983. .ds 12 "\(pl
  984. .as 11 "\*(12
  985. .ds 12 "\|
  986. .as 11 "\*(12
  987. .ds 12 "d
  988. .as 11 "\*(12
  989. .ds 12 "L
  990. .ds 13 "\f12\fP
  991. .as 12 \v'-27u'\s-3\|\*(13\s+3\v'27u'
  992. .as 11 "\*(12
  993. .ds 11 \x'0'\f2\s12\*(11\s\n(99\f\n(98
  994. .nr 11 \w'\*(11'
  995. .nr MK 1
  996. .if 84>\n(.v .ne 84u
  997. .rn 11 10
  998. \*(10
  999. .ps \n(99
  1000. .ft \n(98
  1001. .EN
  1002. .nr 99 \n(.s
  1003. .nr 98 \n(.f
  1004. .rm 12 
  1005. .as 12 "where 
  1006. .ps 12
  1007. .ft 2
  1008. .ds 13 "L
  1009. .ds 14 "\ 
  1010. .as 13 "\|\*(14
  1011. .ds 14 "\(eq
  1012. .as 13 "\*(14
  1013. .ds 14 "\ 
  1014. .as 13 "\*(14
  1015. .ds 14 "\f1(\fP
  1016. .ds 15 "\(*l
  1017. .ds 16 "\f12\fP
  1018. .as 15 \v'-27u'\s-3\*(16\s+3\v'27u'
  1019. .as 14 "\*(15
  1020. .ds 15 "\|
  1021. .as 14 "\*(15
  1022. .ds 15 "\(mi
  1023. .as 14 "\*(15
  1024. .ds 15 "\|
  1025. .as 14 "\*(15
  1026. .ds 15 "\f10\fP\f1.\fP\f10\fP\f12\fP\f18\fP
  1027. .as 14 "\*(15
  1028. .ds 15 "\f1)\fP
  1029. .as 14 "\*(15
  1030. .ds 15 "\(mi\f11\fP
  1031. .as 14 \v'-33u'\s-3\*(15\s+3\v'33u'
  1032. .as 13 "\*(14
  1033. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  1034. .as 12 \*(13
  1035. .ps \n(99
  1036. .ft \n(98
  1037. .as 12 ",
  1038. .ps \n(99
  1039. .ft \n(98
  1040. \*(12
  1041. .nr 99 \n(.s
  1042. .nr 98 \n(.f
  1043. .rm 12 
  1044. .as 12 "and 
  1045. .ps 12
  1046. .ft 2
  1047. .ds 13 "a
  1048. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  1049. .as 12 \*(13
  1050. .ps \n(99
  1051. .ft \n(98
  1052. .as 12 ", 
  1053. .ps 12
  1054. .ft 2
  1055. .ds 13 "b
  1056. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  1057. .as 12 \*(13
  1058. .ps \n(99
  1059. .ft \n(98
  1060. .as 12 ", 
  1061. .ps 12
  1062. .ft 2
  1063. .ds 13 "c
  1064. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  1065. .as 12 \*(13
  1066. .ps \n(99
  1067. .ft \n(98
  1068. .as 12 ", and 
  1069. .ps 12
  1070. .ft 2
  1071. .ds 13 "d
  1072. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  1073. .as 12 \*(13
  1074. .ps \n(99
  1075. .ft \n(98
  1076. .as 12 " are constants.
  1077. .ps \n(99
  1078. .ft \n(98
  1079. \*(12
  1080. These equations are all nonlinear, and values of the constants for
  1081. .\" This equation is nonlinear, and values of the constants for
  1082. various materials are not easily found in the literature.
  1083. This will be a consideration in our development of a dispersion model.
  1084. .NH 2
  1085. Rainbows
  1086. .PP
  1087. Rene Descartes worked out the first scientifically accurate model of
  1088. the rainbow in 1637.\*([.10,\|14\*(.]
  1089. To do this, he assumed the raindrops to be spherical
  1090. and traced rays through a circular, two dimensional
  1091. representation - proof that ray tracing is hardly a new technique!
  1092. Descartes' simulation is illustrated in Figure 3.2.
  1093. .KF
  1094. .sp 5i
  1095. .nr PS 10
  1096. .QP
  1097. .ls 1
  1098. .ce
  1099. Figure 3.2  Descartes' raindrop.
  1100. .nr PS 12
  1101. .PP
  1102. .rs
  1103. .KE
  1104. .LP
  1105. With his simulation, Descartes was able to accurately explain the angular
  1106. size and position of the primary rainbow arc and some of the supernumerary arcs.
  1107. (The supernumerary arcs which sometimes appear
  1108. immediately inside of the primary rainbow arc
  1109. are due to \fIdiffraction\fR effects arising from the wave nature of light,
  1110. and thus cannot be modelled using the geometric optics
  1111. of a particle transport ray tracing paradigm.
  1112. For more on this topic, see Nussenzvieg.\*([.17\*(.]
  1113. )
  1114. Interestingly, an explanation for the color in the rainbow had to await
  1115. Newton's discovery of dispersion some decades later.
  1116. Aside from the supernumerary arcs inside the primary rainbow arc, 
  1117. Descartes' raindrop remains an accurate and sufficient model of the rainbow.
  1118. .PP
  1119. To recreate Descartes' simulation, we trace rays into the raindrop from the
  1120. optical axis (ray 1 in Figure 3.2) to the edge of the circle.
  1121. This corresponds to a range of zero to one for the \fIimpact parameter\fR;
  1122. the value of this impact parameter uniquely determines the path of the ray
  1123. through the raindrop.
  1124. Upon impinging the the raindrop, the ray is refracted, reflected once for
  1125. the primary arc or twice for the secondary arc, and refracted again
  1126. upon exiting the drop.
  1127. Arcs formed by higher-order internal reflections are
  1128. deemed unimportant as they are too dim and/or appear close to the sun in the
  1129. sky, and are therefore not visible.
  1130. .PP
  1131. Note that all rays with an impact parameter greater than or less than that
  1132. of ray 7 in Figure 3.2, the \fIDescartes ray\fR, emerge at an angle closer 
  1133. to the optical axis than that ray.
  1134. Thus the Descartes ray marks a point of inflection in the change of
  1135. emergence angle with impact parameter,
  1136. and there is a concentration of light energy being returned at this angle,
  1137. which is approximately 42 degrees.
  1138. This gives us a bright feature 42 degrees from the optical axis;
  1139. it is dispersion which spreads the bright feature into the spectrum of colors.
  1140. Note also that the fact that all rays which are reflected exactly once inside
  1141. the raindrop emerge at 42 degrees or less, makes the sky appear lighter
  1142. inside of the primary arc of the rainbow.
  1143. Rays reflected exactly twice inside the raindrop emerge with a peak power
  1144. at approximately 52 degrees, with the excess light emerging at greater angles.
  1145. Thus the secondary arc appears at about 52 degrees; between the two
  1146. arcs is a zone of darkness known as Alexander's band.
  1147. .nr PS 10
  1148. .nr VS 10
  1149. .LP
  1150. * The extinction coefficient is a physical quantity specific to each material\*([.22\*(.]
  1151. which varies with frequency.
  1152. The specific values of this coefficient are often unknown for a given material,
  1153. and it is generally set to 0, for the purposes of computer graphics lighting
  1154. models.
  1155. .nr PS 12
  1156. .nr VS 14
  1157. .PP
  1158. To perform an accurate simulation of energy transfer in
  1159. Descartes' raindrop, the Fresnel equation
  1160. should be used to modulate the quantities of reflected and refracted energy.
  1161. With an \fIextinction coefficient\fR* of 0, 
  1162. .\" With an \fIextinction coefficient\fR\(dg of 0, 
  1163. .\" .FS
  1164. .\" .nr LL 4.25i
  1165. .\" \(dg The \fIextinction coefficient\fR is a physical quantity specific to 
  1166. .\" * The extinction coefficient is a physical quantity specific to each material
  1167. .\" .[
  1168. .\" Sparrow
  1169. .\" Radiation
  1170. .\" .]
  1171. .\" which varies with frequency.
  1172. .\" The specific values of this coefficient are often unknown for a given material,
  1173. .\" and it is generally set to 0, for the purposes of computer graphics lighting
  1174. .\" models.
  1175. .\" .FE
  1176. the Fresnel equation for reflection can be written:\*([.2\*(.]
  1177. .EQ I (4)
  1178. .nr 99 \n(.s
  1179. .nr 98 \n(.f
  1180. .ps 12
  1181. .ft 2
  1182. .ds 11 "r
  1183. .ds 12 "pa
  1184. .as 11 \v'18u'\s-3\*(12\s+3\|\v'-18u'
  1185. .ds 12 "\ 
  1186. .as 11 "\*(12
  1187. .ds 12 "\(eq
  1188. .ds 12 \k(97\*(12
  1189. .as 11 "\*(12
  1190. .ds 12 "\ 
  1191. .as 11 "\*(12
  1192. .ds 12 "\(*y
  1193. .ds 13 "\f12\fP
  1194. .as 12 \v'18u'\s-3\*(13\s+3\v'-18u'
  1195. .ds 13 "\f1cos\fP
  1196. .as 12 "\*(13
  1197. .ds 13 "\(*h
  1198. .ds 14 "i
  1199. .as 13 \v'18u'\s-3\*(14\s+3\|\v'-18u'
  1200. .as 12 "\*(13
  1201. .ds 13 "\|
  1202. .as 12 "\*(13
  1203. .ds 13 "\(mi
  1204. .as 12 "\*(13
  1205. .ds 13 "\|
  1206. .as 12 "\*(13
  1207. .ds 13 "\(*y
  1208. .ds 14 "\f11\fP
  1209. .as 13 \v'18u'\s-3\*(14\s+3\v'-18u'
  1210. .as 12 "\*(13
  1211. .ds 13 "\f1cos\fP
  1212. .as 12 "\*(13
  1213. .ds 13 "\(*h
  1214. .ds 14 "t
  1215. .as 13 \v'18u'\s-3\*(14\s+3\|\v'-18u'
  1216. .as 12 "\*(13
  1217. .ds 13 "\(*y
  1218. .ds 14 "\f12\fP
  1219. .as 13 \v'18u'\s-3\*(14\s+3\v'-18u'
  1220. .ds 14 "\f1cos\fP
  1221. .as 13 "\*(14
  1222. .ds 14 "\(*h
  1223. .ds 15 "i
  1224. .as 14 \v'18u'\s-3\*(15\s+3\|\v'-18u'
  1225. .as 13 "\*(14
  1226. .ds 14 "\|
  1227. .as 13 "\*(14
  1228. .ds 14 "\(pl
  1229. .as 13 "\*(14
  1230. .ds 14 "\|
  1231. .as 13 "\*(14
  1232. .ds 14 "\(*y
  1233. .ds 15 "\f11\fP
  1234. .as 14 \v'18u'\s-3\*(15\s+3\v'-18u'
  1235. .as 13 "\*(14
  1236. .ds 14 "\f1cos\fP
  1237. .as 13 "\*(14
  1238. .ds 14 "\(*h
  1239. .ds 15 "t
  1240. .as 14 \v'18u'\s-3\*(15\s+3\|\v'-18u'
  1241. .as 13 "\*(14
  1242. .nr 12 \w'\s12\*(12'
  1243. .nr 13 \w'\s12\*(13'
  1244. .nr 14 \n(12
  1245. .if \n(13>\n(14 .nr 14 \n(13
  1246. .nr 14 \n(14+\s12.5m\s0
  1247. .ds 12 \v'51u'\h'\n(14u-\n(13u/2u'\*(13\
  1248. \h'-\n(13u-\n(12u/2u'\v'-111u'\*(12\
  1249. \h'-\n(14u-\n(12u/2u+.1m'\v'39u'\l'\n(14u-.2m'\h'.1m'\v'21u'
  1250. .as 11 "\*(12
  1251. .ds 11 \x'0'\x'0-45u'\f2\s12\*(11\s\n(99\f\n(98\x'54u'
  1252. .nr 11 \w'\*(11'
  1253. .nr MK 1
  1254. .if 201>\n(.v .ne 201u
  1255. .rn 11 10
  1256. \*(10
  1257. .ps \n(99
  1258. .ft \n(98
  1259. .EN
  1260. .EQ I (5)
  1261. .nr 99 \n(.s
  1262. .nr 98 \n(.f
  1263. .ps 12
  1264. .ft 2
  1265. .ds 11 "r
  1266. .ds 12 "pe
  1267. .as 11 \v'18u'\s-3\*(12\s+3\|\v'-18u'
  1268. .ds 12 "\ 
  1269. .as 11 "\*(12
  1270. .ds 12 "\(eq
  1271. .nr 11 \w'\s12\*(11'
  1272. .ds 11 \h'|\n(97u-\n(11u'\*(11
  1273. .as 11 "\*(12
  1274. .ds 12 "\ 
  1275. .as 11 "\*(12
  1276. .ds 12 "\(*y
  1277. .ds 13 "\f11\fP
  1278. .as 12 \v'18u'\s-3\*(13\s+3\v'-18u'
  1279. .ds 13 "\f1cos\fP
  1280. .as 12 "\*(13
  1281. .ds 13 "\(*h
  1282. .ds 14 "i
  1283. .as 13 \v'18u'\s-3\*(14\s+3\|\v'-18u'
  1284. .as 12 "\*(13
  1285. .ds 13 "\|
  1286. .as 12 "\*(13
  1287. .ds 13 "\(mi
  1288. .as 12 "\*(13
  1289. .ds 13 "\|
  1290. .as 12 "\*(13
  1291. .ds 13 "\(*y
  1292. .ds 14 "\f12\fP
  1293. .as 13 \v'18u'\s-3\*(14\s+3\v'-18u'
  1294. .as 12 "\*(13
  1295. .ds 13 "\f1cos\fP
  1296. .as 12 "\*(13
  1297. .ds 13 "\(*h
  1298. .ds 14 "t
  1299. .as 13 \v'18u'\s-3\*(14\s+3\|\v'-18u'
  1300. .as 12 "\*(13
  1301. .ds 13 "\(*y
  1302. .ds 14 "\f11\fP
  1303. .as 13 \v'18u'\s-3\*(14\s+3\v'-18u'
  1304. .ds 14 "\f1cos\fP
  1305. .as 13 "\*(14
  1306. .ds 14 "\(*h
  1307. .ds 15 "i
  1308. .as 14 \v'18u'\s-3\*(15\s+3\|\v'-18u'
  1309. .as 13 "\*(14
  1310. .ds 14 "\|
  1311. .as 13 "\*(14
  1312. .ds 14 "\(pl
  1313. .as 13 "\*(14
  1314. .ds 14 "\|
  1315. .as 13 "\*(14
  1316. .ds 14 "\(*y
  1317. .ds 15 "\f12\fP
  1318. .as 14 \v'18u'\s-3\*(15\s+3\v'-18u'
  1319. .as 13 "\*(14
  1320. .ds 14 "\f1cos\fP
  1321. .as 13 "\*(14
  1322. .ds 14 "\(*h
  1323. .ds 15 "t
  1324. .as 14 \v'18u'\s-3\*(15\s+3\|\v'-18u'
  1325. .as 13 "\*(14
  1326. .nr 12 \w'\s12\*(12'
  1327. .nr 13 \w'\s12\*(13'
  1328. .nr 14 \n(12
  1329. .if \n(13>\n(14 .nr 14 \n(13
  1330. .nr 14 \n(14+\s12.5m\s0
  1331. .ds 12 \v'51u'\h'\n(14u-\n(13u/2u'\*(13\
  1332. \h'-\n(13u-\n(12u/2u'\v'-111u'\*(12\
  1333. \h'-\n(14u-\n(12u/2u+.1m'\v'39u'\l'\n(14u-.2m'\h'.1m'\v'21u'
  1334. .as 11 "\*(12
  1335. .ds 11 \x'0'\x'0-45u'\f2\s12\*(11\s\n(99\f\n(98\x'54u'
  1336. .nr 11 \w'\*(11'
  1337. .nr MK 1
  1338. .if 201>\n(.v .ne 201u
  1339. .rn 11 10
  1340. \*(10
  1341. .ps \n(99
  1342. .ft \n(98
  1343. .EN
  1344. .EQ I (6)
  1345. .nr 99 \n(.s
  1346. .nr 98 \n(.f
  1347. .ps 12
  1348. .ft 2
  1349. .ds 11 "R
  1350. .ds 12 "\ 
  1351. .as 11 "\|\*(12
  1352. .ds 12 "\(eq
  1353. .nr 11 \w'\s12\*(11'
  1354. .ds 11 \h'|\n(97u-\n(11u'\*(11
  1355. .as 11 "\*(12
  1356. .ds 12 "\ 
  1357. .as 11 "\*(12
  1358. .ds 12 "r
  1359. .ds 13 "pa
  1360. .ds 14 "\f12\fP
  1361. .as 13 \|
  1362. .nr 13 \w'\s9\*(13'
  1363. .ds 14 \|\|\*(14
  1364. .nr 14 \w'\s9\*(14'
  1365. .nr 15 \n(14
  1366. .if \n(13>\n(15 .nr 15 \n(13
  1367. .as 12 \v'18u'\s9\*(13\h'-\n(13u'\v'-45u'\
  1368. \s9\*(14\h'-\n(14u+\n(15u'\s12\v'27u'
  1369. .ds 13 "\|
  1370. .as 12 "\*(13
  1371. .ds 13 "\(pl
  1372. .as 12 "\*(13
  1373. .ds 13 "\|
  1374. .as 12 "\*(13
  1375. .ds 13 "r
  1376. .ds 14 "pe
  1377. .ds 15 "\f12\fP
  1378. .as 14 \|
  1379. .nr 14 \w'\s9\*(14'
  1380. .ds 15 \|\|\*(15
  1381. .nr 15 \w'\s9\*(15'
  1382. .nr 16 \n(15
  1383. .if \n(14>\n(16 .nr 16 \n(14
  1384. .as 13 \v'18u'\s9\*(14\h'-\n(14u'\v'-45u'\
  1385. \s9\*(15\h'-\n(15u+\n(16u'\s12\v'27u'
  1386. .as 12 "\*(13
  1387. .ds 13 "\f12\fP
  1388. .nr 12 \w'\s12\*(12'
  1389. .nr 13 \w'\s12\*(13'
  1390. .nr 14 \n(12
  1391. .if \n(13>\n(14 .nr 14 \n(13
  1392. .nr 14 \n(14+\s12.5m\s0
  1393. .ds 12 \v'51u'\h'\n(14u-\n(13u/2u'\*(13\
  1394. \h'-\n(13u-\n(12u/2u'\v'-111u'\*(12\
  1395. \h'-\n(14u-\n(12u/2u+.1m'\v'39u'\l'\n(14u-.2m'\h'.1m'\v'21u'
  1396. .as 11 "\*(12
  1397. .ds 11 \x'0'\x'0-57u'\f2\s12\*(11\s\n(99\f\n(98\x'36u'
  1398. .nr 11 \w'\*(11'
  1399. .nr MK 1
  1400. .if 195>\n(.v .ne 195u
  1401. .rn 11 10
  1402. \*(10
  1403. .ps \n(99
  1404. .ft \n(98
  1405. .EN
  1406. .sp
  1407. where 
  1408. .nr 99 \n(.s
  1409. .nr 98 \n(.f
  1410. .rm 12 
  1411. .ps 12
  1412. .ft 2
  1413. .ds 13 "r
  1414. .ds 14 "pa
  1415. .as 13 \v'18u'\s-3\*(14\s+3\|\v'-18u'
  1416. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98\x'3u'
  1417. .as 12 \*(13
  1418. .ps \n(99
  1419. .ft \n(98
  1420. .as 12 " is the reflection coefficient for the component of light which
  1421. .ps \n(99
  1422. .ft \n(98
  1423. \*(12
  1424. is polarized parallel to the surface,
  1425. .nr 99 \n(.s
  1426. .nr 98 \n(.f
  1427. .rm 12 
  1428. .ps 12
  1429. .ft 2
  1430. .ds 13 "r
  1431. .ds 14 "pe
  1432. .as 13 \v'18u'\s-3\*(14\s+3\|\v'-18u'
  1433. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98\x'3u'
  1434. .as 12 \*(13
  1435. .ps \n(99
  1436. .ft \n(98
  1437. .as 12 " is the reflection coefficient for the component 
  1438. .ps \n(99
  1439. .ft \n(98
  1440. \*(12
  1441. polarized perpendicular to the surface,
  1442. .nr 99 \n(.s
  1443. .nr 98 \n(.f
  1444. .rm 12 
  1445. .ps 12
  1446. .ft 2
  1447. .ds 13 "\(*y
  1448. .ds 14 "\f11\fP
  1449. .as 13 \v'18u'\s-3\*(14\s+3\v'-18u'
  1450. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98\x'3u'
  1451. .as 12 \*(13
  1452. .ps \n(99
  1453. .ft \n(98
  1454. .as 12 " and 
  1455. .ps 12
  1456. .ft 2
  1457. .ds 13 "\(*y
  1458. .ds 14 "\f12\fP
  1459. .as 13 \v'18u'\s-3\*(14\s+3\v'-18u'
  1460. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98\x'3u'
  1461. .as 12 \*(13
  1462. .ps \n(99
  1463. .ft \n(98
  1464. .as 12 " are the refractive indices of the two materials, 
  1465. .ps \n(99
  1466. .ft \n(98
  1467. \*(12
  1468. .nr 99 \n(.s
  1469. .nr 98 \n(.f
  1470. .rm 12 
  1471. .ps 12
  1472. .ft 2
  1473. .ds 13 "\(*h
  1474. .ds 14 "i
  1475. .as 13 \v'18u'\s-3\*(14\s+3\|\v'-18u'
  1476. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98\x'3u'
  1477. .as 12 \*(13
  1478. .ps \n(99
  1479. .ft \n(98
  1480. .as 12 " is the angle of incidence, 
  1481. .ps 12
  1482. .ft 2
  1483. .ds 13 "\(*h
  1484. .ds 14 "t
  1485. .as 13 \v'18u'\s-3\*(14\s+3\|\v'-18u'
  1486. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98\x'3u'
  1487. .as 12 \*(13
  1488. .ps \n(99
  1489. .ft \n(98
  1490. .as 12 " is the 
  1491. .ps \n(99
  1492. .ft \n(98
  1493. \*(12
  1494. angle of refraction, 
  1495. .nr 99 \n(.s
  1496. .nr 98 \n(.f
  1497. .rm 12 
  1498. .as 12 "and 
  1499. .ps 12
  1500. .ft 2
  1501. .ds 13 "R
  1502. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  1503. .as 12 \*(13
  1504. .ps \n(99
  1505. .ft \n(98
  1506. .as 12 " is the total reflectivity.
  1507. .ps \n(99
  1508. .ft \n(98
  1509. \*(12
  1510. .nr 99 \n(.s
  1511. .nr 98 \n(.f
  1512. .rm 12 
  1513. .as 12 "Light not reflected is refracted in quantity 
  1514. .ps 12
  1515. .ft 2
  1516. .ds 13 "\f11\fP
  1517. .ds 14 "\|
  1518. .as 13 "\*(14
  1519. .ds 14 "\(mi
  1520. .as 13 "\*(14
  1521. .ds 14 "\|
  1522. .as 13 "\*(14
  1523. .ds 14 "R
  1524. .as 13 "\*(14
  1525. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  1526. .as 12 \*(13
  1527. .ps \n(99
  1528. .ft \n(98
  1529. .as 12 ".
  1530. .ps \n(99
  1531. .ft \n(98
  1532. \*(12
  1533. .KF
  1534. .sp 2.5i
  1535. .nr PS 10
  1536. .QP
  1537. .ls 1
  1538. .ce
  1539. Figure 3.3  The cone of a rainbow.
  1540. .nr PS 12
  1541. .PP
  1542. .rs
  1543. .KE
  1544. .PP
  1545. The rainbow phenomenon exists as a cone in space which is unique for each
  1546. point of view (and indeed for each eye of the individual observer);
  1547. Figure 3.3 is intended to illuminate this.
  1548. Inspect it carefully for the following argument.
  1549. Since the geometry of reflection and refraction as discussed above
  1550. gives us a spectrum appearing at an angle the same as that of the Descartes ray
  1551. from the straight back direction to the light source,
  1552. we would expect to see that spectrum in all (sunlit) raindrops viewed from
  1553. that angle.
  1554. The sun's rays can be assumed to be parallel,
  1555. thus this effect appears to the observer as a circle 
  1556. of angular radius 42 degrees, since the observer is, by definition, at the 
  1557. apex of the cone.
  1558. Naturally occurring rainbows actually constitute a cone of half-angle 42
  1559. degrees around the \fIantisolar point\fR 
  1560. and have an angular width of approximately 2 degrees.
  1561. The secondary arc appears at a half-angle of 52 degrees.
  1562. .NH 2
  1563. Computer Graphics
  1564. .PP
  1565. As mentioned above, the Cook-Torrance shading model relates reflection
  1566. to index of refraction and frequency through the Fresnel equation.\*([.22\*(.]
  1567. A model of refraction relating index of refraction to frequency
  1568. has been developed by Thomas\*([.23\*(.]
  1569. and more recently by the author;\*([.15,\|16\*(.]
  1570. that work is extended here to include a physical model of the rainbow.
  1571. .PP
  1572. The problem of integration and reconstruction using point samples has been
  1573. addressed by Cook\*([.6\*(.]
  1574. in his discussion of the distributed ray tracing model.\*([.4\*(.]
  1575. The dispersion model developed by the author is a straightforward 
  1576. application of Cook's techniques, as an extension to the repertoire
  1577. of effects available through distributed ray tracing.
  1578. .PP
  1579. A model of atmospheric rainbows has been alluded to in the literature,\*([.5\*(.]
  1580. but not presented in detail.
  1581. A physical model of the rainbow requires a fair amount of development 
  1582. work.
  1583. Fortunately, the development work being done,
  1584. the results are easy to include as an added feature in a rendering program.
  1585. .NH
  1586. SOLUTION
  1587. .NH 2
  1588. Sampling in the Frequency Domain of Light
  1589. .PP
  1590. To model dispersion, we must integrate the power spectrum of light
  1591. at each sample point in the image where there occurs dispersive refraction,
  1592. such as on the surface of a glass prism.
  1593. The integral of the power spectrum can be expressed
  1594. .EQ I (7)
  1595. .nr 99 \n(.s
  1596. .nr 98 \n(.f
  1597. .ps 12
  1598. .ft 2
  1599. .ds 11 "I
  1600. .ds 12 "T
  1601. .as 11 \v'18u'\s-3\*(12\s+3\|\v'-18u'
  1602. .ds 12 "\ 
  1603. .as 11 "\*(12
  1604. .ds 12 "\(eq
  1605. .as 11 "\*(12
  1606. .ds 12 "\ 
  1607. .as 11 "\*(12
  1608. .ds 12 \s12\v'.1m'\s+4\(is\s-4\v'-.1m'\s12
  1609. .ds 13 "\f13\fP\f18\fP\f10\fP
  1610. .ds 13 \s7\*(13\s9
  1611. .ds 14 "\f18\fP\f10\fP\f10\fP
  1612. .ds 14 \s7\*(14\s9
  1613. .nr 12 \w'\s12\*(12'
  1614. .nr 15 \n(12
  1615. .nr 13 \w'\s9\*(13'
  1616. .if \n(13>\n(15 .nr 15 \n(13
  1617. .nr 14 \w'\s9\*(14'
  1618. .if \n(14>\n(15 .nr 15 \n(14
  1619. .ds 15 \v'63u'\h'\n(15u-\n(13u/2u'\s9\*(13\s12\h'-\n(15u-\n(13u/2u'\v'-63u'\
  1620. \h'\n(15u-\n(12u/2u'\*(12\h'\n(15u-\n(12u/2u'\
  1621. \v'-93u'\h'-\n(15u-\n(14u/2u'\s9\*(14\s12\h'\n(15u-\n(14u/2u'\v'93u'\
  1622.  
  1623. .as 11 "\*(15
  1624. .ds 12 "I
  1625. .as 11 "\*(12
  1626. .ds 12 "\f1(\fP
  1627. .as 11 "\|\*(12
  1628. .ds 12 "\(*l
  1629. .as 11 "\*(12
  1630. .ds 12 "\f1)\fP
  1631. .as 11 "\*(12
  1632. .ds 12 "\ 
  1633. .as 11 "\*(12
  1634. .ds 12 "d
  1635. .as 11 "\*(12
  1636. .ds 12 "\(*l
  1637. .as 11 "\|\*(12
  1638. .ds 11 \x'0'\x'0-48u'\f2\s12\*(11\s\n(99\f\n(98\x'48u'
  1639. .nr 11 \w'\*(11'
  1640. .nr MK 0
  1641. .if 198>\n(.v .ne 198u
  1642. .rn 11 10
  1643. \*(10
  1644. .ps \n(99
  1645. .ft \n(98
  1646. .EN
  1647. .nr 99 \n(.s
  1648. .nr 98 \n(.f
  1649. .rm 12 
  1650. .as 12 "where 
  1651. .ps 12
  1652. .ft 2
  1653. .ds 13 "I
  1654. .ds 14 "T
  1655. .as 13 \v'18u'\s-3\*(14\s+3\|\v'-18u'
  1656. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98\x'3u'
  1657. .as 12 \*(13
  1658. .ps \n(99
  1659. .ft \n(98
  1660. .as 12 " is the total illuminance at the given point in space
  1661. .ps \n(99
  1662. .ft \n(98
  1663. \*(12
  1664. .nr 99 \n(.s
  1665. .nr 98 \n(.f
  1666. .rm 12 
  1667. .as 12 "and 
  1668. .ps 12
  1669. .ft 2
  1670. .ds 13 "I
  1671. .ds 14 "\f1(\fP
  1672. .as 13 "\|\*(14
  1673. .ds 14 "\(*l
  1674. .as 13 "\*(14
  1675. .ds 14 "\f1)\fP
  1676. .as 13 "\*(14
  1677. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  1678. .as 12 \*(13
  1679. .ps \n(99
  1680. .ft \n(98
  1681. .as 12 " is the illuminance at wavelength 
  1682. .ps 12
  1683. .ft 2
  1684. .ds 13 "\(*l
  1685. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  1686. .as 12 \*(13
  1687. .ps \n(99
  1688. .ft \n(98
  1689. .as 12 "
  1690. .ps \n(99
  1691. .ft \n(98
  1692. \*(12
  1693. at that point.
  1694. As we need only integrate the power spectrum of \fItransmitted\fR light
  1695. at dispersive surfaces, since only transmitted or refracted light is dispersed,
  1696. the integral we are interested in can be stated
  1697. .EQ I (8)
  1698. .nr 99 \n(.s
  1699. .nr 98 \n(.f
  1700. .ps 12
  1701. .ft 2
  1702. .ds 11 "I
  1703. .ds 12 "t
  1704. .as 11 \v'18u'\s-3\*(12\s+3\|\v'-18u'
  1705. .ds 12 "\ 
  1706. .as 11 "\*(12
  1707. .ds 12 "\(eq
  1708. .as 11 "\*(12
  1709. .ds 12 "\ 
  1710. .as 11 "\*(12
  1711. .ds 12 \s12\v'.1m'\s+4\(is\s-4\v'-.1m'\s12
  1712. .ds 13 "\f13\fP\f18\fP\f10\fP
  1713. .ds 13 \s7\*(13\s9
  1714. .ds 14 "\f18\fP\f10\fP\f10\fP
  1715. .ds 14 \s7\*(14\s9
  1716. .nr 12 \w'\s12\*(12'
  1717. .nr 15 \n(12
  1718. .nr 13 \w'\s9\*(13'
  1719. .if \n(13>\n(15 .nr 15 \n(13
  1720. .nr 14 \w'\s9\*(14'
  1721. .if \n(14>\n(15 .nr 15 \n(14
  1722. .ds 15 \v'63u'\h'\n(15u-\n(13u/2u'\s9\*(13\s12\h'-\n(15u-\n(13u/2u'\v'-63u'\
  1723. \h'\n(15u-\n(12u/2u'\*(12\h'\n(15u-\n(12u/2u'\
  1724. \v'-93u'\h'-\n(15u-\n(14u/2u'\s9\*(14\s12\h'\n(15u-\n(14u/2u'\v'93u'\
  1725.  
  1726. .as 11 "\*(15
  1727. .ds 12 "T
  1728. .as 11 "\*(12
  1729. .ds 12 "\f1(\fP
  1730. .as 11 "\|\*(12
  1731. .ds 12 "\(*l
  1732. .as 11 "\*(12
  1733. .ds 12 "\f1)\fP
  1734. .as 11 "\*(12
  1735. .ds 12 "\ 
  1736. .as 11 "\*(12
  1737. .ds 12 "d
  1738. .as 11 "\*(12
  1739. .ds 12 "\(*l
  1740. .as 11 "\|\*(12
  1741. .ds 11 \x'0'\x'0-48u'\f2\s12\*(11\s\n(99\f\n(98\x'48u'
  1742. .nr 11 \w'\*(11'
  1743. .nr MK 0
  1744. .if 198>\n(.v .ne 198u
  1745. .rn 11 10
  1746. \*(10
  1747. .ps \n(99
  1748. .ft \n(98
  1749. .EN
  1750. .nr 99 \n(.s
  1751. .nr 98 \n(.f
  1752. .rm 12 
  1753. .as 12 "where 
  1754. .ps 12
  1755. .ft 2
  1756. .ds 13 "I
  1757. .ds 14 "t
  1758. .as 13 \v'18u'\s-3\*(14\s+3\|\v'-18u'
  1759. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98\x'3u'
  1760. .as 12 \*(13
  1761. .ps \n(99
  1762. .ft \n(98
  1763. .as 12 " is now the illuminance by transmitted
  1764. .ps \n(99
  1765. .ft \n(98
  1766. \*(12
  1767. light at a point in space on the boundary of a change in refractive index,
  1768. .nr 99 \n(.s
  1769. .nr 98 \n(.f
  1770. .rm 12 
  1771. .as 12 "and 
  1772. .ps 12
  1773. .ft 2
  1774. .ds 13 "T
  1775. .ds 14 "\f1(\fP
  1776. .as 13 "\|\*(14
  1777. .ds 14 "\(*l
  1778. .as 13 "\*(14
  1779. .ds 14 "\f1)\fP
  1780. .as 13 "\*(14
  1781. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  1782. .as 12 \*(13
  1783. .ps \n(99
  1784. .ft \n(98
  1785. .as 12 " is the illuminance by the transmitted light at 
  1786. .ps \n(99
  1787. .ft \n(98
  1788. \*(12
  1789. .nr 99 \n(.s
  1790. .nr 98 \n(.f
  1791. .rm 12 
  1792. .as 12 "wavelength 
  1793. .ps 12
  1794. .ft 2
  1795. .ds 13 "\(*l
  1796. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  1797. .as 12 \*(13
  1798. .ps \n(99
  1799. .ft \n(98
  1800. .as 12 ".
  1801. .ps \n(99
  1802. .ft \n(98
  1803. \*(12
  1804. .PP
  1805. As previously stated, we will approximate this integral using a set of point
  1806. samples.
  1807. We perform \fIstochastic antialiasing\fR of our integral by \fIjittering\fR\*([.6\*(.]
  1808. the samples.
  1809. .nr 99 \n(.s
  1810. .nr 98 \n(.f
  1811. .rm 12 
  1812. .as 12 "If a sample 
  1813. .ps 12
  1814. .ft 2
  1815. .ds 13 "\^f\|
  1816. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  1817. .as 12 \*(13
  1818. .ps \n(99
  1819. .ft \n(98
  1820. .as 12 " at frequency 
  1821. .ps 12
  1822. .ft 2
  1823. .ds 13 "\(*l
  1824. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  1825. .as 12 \*(13
  1826. .ps \n(99
  1827. .ft \n(98
  1828. .as 12 " represents the power in the spectrum over
  1829. .ps \n(99
  1830. .ft \n(98
  1831. \*(12
  1832. .nr 99 \n(.s
  1833. .nr 98 \n(.f
  1834. .rm 12 
  1835. .as 12 "an interval of width 
  1836. .ps 12
  1837. .ft 2
  1838. .ds 13 "\(*D
  1839. .ds 14 "\^f\|
  1840. .as 13 "\*(14
  1841. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  1842. .as 12 \*(13
  1843. .ps \n(99
  1844. .ft \n(98
  1845. .as 12 ",
  1846. .ps \n(99
  1847. .ft \n(98
  1848. \*(12
  1849. the jittering consists of adding a random offset
  1850. .nr 99 \n(.s
  1851. .nr 98 \n(.f
  1852. .rm 12 
  1853. .ps 12
  1854. .ft 2
  1855. .ds 13 "\(*D
  1856. .ds 14 "\^f\|
  1857. .as 13 "\*(14
  1858. .ds 14 "\|
  1859. .as 13 "\|\*(14
  1860. .ds 14 "\f1(\fPX
  1861. .as 13 "\*(14
  1862. .ds 14 "\|
  1863. .as 13 "\|\*(14
  1864. .ds 14 "\(mi
  1865. .as 13 "\*(14
  1866. .ds 14 "\|
  1867. .as 13 "\*(14
  1868. .ds 14 "\f11\fP
  1869. .as 13 "\*(14
  1870. .ds 14 "\(sl
  1871. .as 13 "\*(14
  1872. .ds 14 "\f12\fP\f1)\fP
  1873. .as 13 "\*(14
  1874. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  1875. .as 12 \*(13
  1876. .ps \n(99
  1877. .ft \n(98
  1878. .as 12 "
  1879. .ps \n(99
  1880. .ft \n(98
  1881. \*(12
  1882. .nr 99 \n(.s
  1883. .nr 98 \n(.f
  1884. .rm 12 
  1885. .as 12 "where 
  1886. .ps 12
  1887. .ft 2
  1888. .ds 13 "X
  1889. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  1890. .as 12 \*(13
  1891. .ps \n(99
  1892. .ft \n(98
  1893. .as 12 " is a random variable of uniform distribution in the range 
  1894. .ps 12
  1895. .ft 2
  1896. .ds 13 "\f1[\fP\f10\fP\f1.\fP\f1.\fP\f11\fP\f1]\fP
  1897. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  1898. .as 12 \*(13
  1899. .ps \n(99
  1900. .ft \n(98
  1901. .as 12 ".
  1902. .ps \n(99
  1903. .ft \n(98
  1904. \*(12
  1905. .nr 99 \n(.s
  1906. .nr 98 \n(.f
  1907. .rm 12 
  1908. .as 12 "The net effect is to randomly place the sample 
  1909. .ps 12
  1910. .ft 2
  1911. .ds 13 "\^f\|
  1912. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  1913. .as 12 \*(13
  1914. .ps \n(99
  1915. .ft \n(98
  1916. .as 12 " somewhere within the 
  1917. .ps \n(99
  1918. .ft \n(98
  1919. \*(12
  1920. .nr 99 \n(.s
  1921. .nr 98 \n(.f
  1922. .rm 12 
  1923. .as 12 "interval 
  1924. .ps 12
  1925. .ft 2
  1926. .ds 13 "\(*l
  1927. .ds 14 "\|
  1928. .as 13 "\*(14
  1929. .ds 14 "\(mi
  1930. .as 13 "\*(14
  1931. .ds 14 "\|
  1932. .as 13 "\*(14
  1933. .ds 14 "\(*D
  1934. .as 13 "\*(14
  1935. .ds 14 "\^f\|
  1936. .as 13 "\*(14
  1937. .ds 14 "\(sl
  1938. .as 13 "\|\*(14
  1939. .ds 14 "\f12\fP
  1940. .as 13 "\*(14
  1941. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  1942. .as 12 \*(13
  1943. .ps \n(99
  1944. .ft \n(98
  1945. .as 12 " to 
  1946. .ps 12
  1947. .ft 2
  1948. .ds 13 "\(*l
  1949. .ds 14 "\|
  1950. .as 13 "\*(14
  1951. .ds 14 "\(pl
  1952. .as 13 "\*(14
  1953. .ds 14 "\|
  1954. .as 13 "\*(14
  1955. .ds 14 "\(*D
  1956. .as 13 "\*(14
  1957. .ds 14 "\^f\|
  1958. .as 13 "\*(14
  1959. .ds 14 "\(sl
  1960. .as 13 "\|\*(14
  1961. .ds 14 "\f12\fP
  1962. .as 13 "\*(14
  1963. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  1964. .as 12 \*(13
  1965. .ps \n(99
  1966. .ft \n(98
  1967. .as 12 ".
  1968. .ps \n(99
  1969. .ft \n(98
  1970. \*(12
  1971. .PP
  1972. The fact that we take point samples in the frequency continuum of
  1973. light implies that we are also taking point samples of the continuum of the
  1974. dispersion curve, as index of refraction is a function of frequency.
  1975. Thus we face the choice of whether to
  1976. jitter the frequency (and therefore the color) of the rays or the
  1977. refractive index of the material, or both.
  1978. Given that the the jittered sample at
  1979. .nr 99 \n(.s
  1980. .nr 98 \n(.f
  1981. .rm 12 
  1982. .as 12 "frequency 
  1983. .ps 12
  1984. .ft 2
  1985. .ds 13 "\^f\|
  1986. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  1987. .as 12 \*(13
  1988. .ps \n(99
  1989. .ft \n(98
  1990. .as 12 " needs to be translated into 
  1991. .ps 12
  1992. .ft 2
  1993. .ds 13 "R\|\f1(\fP\^f\|\|\f1)\fP
  1994. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  1995. .as 12 \*(13
  1996. .ps \n(99
  1997. .ft \n(98
  1998. .as 12 ",
  1999. .ps \n(99
  2000. .ft \n(98
  2001. \*(12
  2002. .nr 99 \n(.s
  2003. .nr 98 \n(.f
  2004. .rm 12 
  2005. .as 12 "the value of the refractive index function 
  2006. .ps 12
  2007. .ft 2
  2008. .ds 13 "R
  2009. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  2010. .as 12 \*(13
  2011. .ps \n(99
  2012. .ft \n(98
  2013. .as 12 " at 
  2014. .ps 12
  2015. .ft 2
  2016. .ds 13 "\^f\|
  2017. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  2018. .as 12 \*(13
  2019. .ps \n(99
  2020. .ft \n(98
  2021. .as 12 ",
  2022. .ps \n(99
  2023. .ft \n(98
  2024. \*(12
  2025. .nr 99 \n(.s
  2026. .nr 98 \n(.f
  2027. .rm 12 
  2028. .as 12 "we will prefer to jitter a linear function 
  2029. .ps 12
  2030. .ft 2
  2031. .ds 13 "R
  2032. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  2033. .as 12 \*(13
  2034. .ps \n(99
  2035. .ft \n(98
  2036. .as 12 " over a nonlinear function
  2037. .ps \n(99
  2038. .ft \n(98
  2039. \*(12
  2040. for reasons of computational efficiency,
  2041. as linear interpolation is in general quicker to evaluate
  2042. than nonlinear interpolation.
  2043. .PP
  2044. This may motivate us to contrive piecewise linear
  2045. approximations to the spectrum and the dispersion curve.
  2046. It is unlikely that 
  2047. the viewer of the final image will be able to discriminate between 
  2048. a physically accurate nonlinear model and a computationally efficient
  2049. linear approximation;
  2050. furthermore, since the dispersion curve is specific to a given material,
  2051. to be true to nature 
  2052. one would need to tabulate data for every distinct material to be rendered.
  2053. We therefore employ a
  2054. (one-piece)
  2055. linear approximation to the dispersion curve for our rendering dispersion model.
  2056. .PP
  2057. The refractive index and dispersive power for surfaces can be input
  2058. parameters.
  2059. Thus one can specify a polygon with an associated refractive index of,
  2060. for example, 4.2 and a dispersive power of perhaps 0.5, both of which are
  2061. outlandish in terms of the "real" world, but viable within our model.
  2062. It is interesting to create situations and materials which cannot exist
  2063. in our everyday experience;
  2064. this is part of the power of computer graphics.
  2065. .PP
  2066. The issue of which quantity to jitter, refractive index or color, or both,
  2067. should be evaluated in the light of computational efficiency.
  2068. The reason for jittering samples is to avoid spectral aliasing,
  2069. however,
  2070. it has been our experience that spectral aliasing is
  2071. not a significant problem in any but deliberately pathological scenes.
  2072. That is, the distinct overlapping images of different colors are simply
  2073. not readily visible unless the dispersive power is unrealistically high.
  2074. When jittering is deemed desirable, we jitter the frequency
  2075. .nr 99 \n(.s
  2076. .nr 98 \n(.f
  2077. .rm 12 
  2078. .as 12 "of the ray and derive, in a pre-rendering operation, a constant 
  2079. .ps 12
  2080. .ft 2
  2081. .ds 13 "c
  2082. .ds 14 "s
  2083. .as 13 \v'18u'\s-3\*(14\s+3\|\v'-18u'
  2084. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98\x'3u'
  2085. .as 12 \*(13
  2086. .ps \n(99
  2087. .ft \n(98
  2088. .as 12 "
  2089. .ps \n(99
  2090. .ft \n(98
  2091. \*(12
  2092. .nr 99 \n(.s
  2093. .nr 98 \n(.f
  2094. .rm 12 
  2095. .as 12 "for each refractive surface 
  2096. .ps 12
  2097. .ft 2
  2098. .ds 13 "s
  2099. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  2100. .as 12 \*(13
  2101. .ps \n(99
  2102. .ft \n(98
  2103. .as 12 " in the scene:
  2104. .ps \n(99
  2105. .ft \n(98
  2106. \*(12
  2107. .EQ I (9)
  2108. .nr 99 \n(.s
  2109. .nr 98 \n(.f
  2110. .ps 12
  2111. .ft 2
  2112. .ds 11 "c
  2113. .ds 12 "s
  2114. .as 11 \v'18u'\s-3\*(12\s+3\|\v'-18u'
  2115. .ds 12 "\ 
  2116. .as 11 "\*(12
  2117. .ds 12 "\(eq
  2118. .as 11 "\*(12
  2119. .ds 12 "\ 
  2120. .as 11 "\*(12
  2121. .ds 12 "w
  2122. .ds 13 "\f1(\fP
  2123. .as 12 "\|\*(13
  2124. .ds 13 "\(*y
  2125. .as 12 "\*(13
  2126. .ds 13 "\|
  2127. .as 12 "\*(13
  2128. .ds 13 "\(mi
  2129. .as 12 "\*(13
  2130. .ds 13 "\|
  2131. .as 12 "\*(13
  2132. .ds 13 "\f11\fP
  2133. .as 12 "\*(13
  2134. .ds 13 "\f1)\fP
  2135. .as 12 "\*(13
  2136. .ds 13 "\ 
  2137. .as 12 "\*(13
  2138. .ds 13 "\(mi
  2139. .as 12 "\*(13
  2140. .ds 13 "\ 
  2141. .as 12 "\*(13
  2142. .ds 13 "\(*y
  2143. .as 12 "\*(13
  2144. .ds 13 "\f10\fP\f1.\fP\f17\fP\f16\fP
  2145. .nr 12 \w'\s12\*(12'
  2146. .nr 13 \w'\s12\*(13'
  2147. .nr 14 \n(12
  2148. .if \n(13>\n(14 .nr 14 \n(13
  2149. .nr 14 \n(14+\s12.5m\s0
  2150. .ds 12 \v'51u'\h'\n(14u-\n(13u/2u'\*(13\
  2151. \h'-\n(13u-\n(12u/2u'\v'-93u'\*(12\
  2152. \h'-\n(14u-\n(12u/2u+.1m'\v'21u'\l'\n(14u-.2m'\h'.1m'\v'21u'
  2153. .as 11 "\*(12
  2154. .ds 11 \x'0'\x'0-27u'\f2\s12\*(11\s\n(99\f\n(98\x'36u'
  2155. .nr 11 \w'\*(11'
  2156. .nr MK 0
  2157. .if 165>\n(.v .ne 165u
  2158. .rn 11 10
  2159. \*(10
  2160. .ps \n(99
  2161. .ft \n(98
  2162. .EN
  2163. .nr 99 \n(.s
  2164. .nr 98 \n(.f
  2165. .rm 12 
  2166. .as 12 "where 
  2167. .ps 12
  2168. .ft 2
  2169. .ds 13 "w
  2170. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  2171. .as 12 \*(13
  2172. .ps \n(99
  2173. .ft \n(98
  2174. .as 12 " is the dispersive power,
  2175. .ps \n(99
  2176. .ft \n(98
  2177. \*(12
  2178. .nr 99 \n(.s
  2179. .nr 98 \n(.f
  2180. .rm 12 
  2181. .ps 12
  2182. .ft 2
  2183. .ds 13 "\(*y
  2184. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  2185. .as 12 \*(13
  2186. .ps \n(99
  2187. .ft \n(98
  2188. .as 12 " is the refractive index at the far red end of the spectrum,
  2189. .ps \n(99
  2190. .ft \n(98
  2191. \*(12
  2192. 0.76 is the proportion of the spectrum that lies between the C and F
  2193. Fraunhofer lines.
  2194. .nr 99 \n(.s
  2195. .nr 98 \n(.f
  2196. .rm 12 
  2197. .as 12 "This constant 
  2198. .ps 12
  2199. .ft 2
  2200. .ds 13 "c
  2201. .ds 14 "s
  2202. .as 13 \v'18u'\s-3\*(14\s+3\|\v'-18u'
  2203. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98\x'3u'
  2204. .as 12 \*(13
  2205. .ps \n(99
  2206. .ft \n(98
  2207. .as 12 " when multiplied by the
  2208. .ps \n(99
  2209. .ft \n(98
  2210. \*(12
  2211. the frequency of a sample gives the refractive index at that frequency,
  2212. for use in calculations of propagation of refracted light.
  2213. .nr 99 \n(.s
  2214. .nr 98 \n(.f
  2215. .rm 12 
  2216. .as 12 "(Note that this assumes that frequency is specified in the range 
  2217. .ps 12
  2218. .ft 2
  2219. .ds 13 "\f1[\fP\f10\fP\f1.\fP\f1.\fP\f11\fP\f1]\fP
  2220. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  2221. .as 12 \*(13
  2222. .ps \n(99
  2223. .ft \n(98
  2224. .as 12 ".)
  2225. .ps \n(99
  2226. .ft \n(98
  2227. \*(12
  2228. Thus the cost of jittering is reduced to one floating point multiplication
  2229. per surface encountered, plus the negligible preprocessing cost of evaluating
  2230. .nr 99 \n(.s
  2231. .nr 98 \n(.f
  2232. .rm 12 
  2233. .ps 12
  2234. .ft 2
  2235. .ds 13 "c
  2236. .ds 14 "s
  2237. .as 13 \v'18u'\s-3\*(14\s+3\|\v'-18u'
  2238. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98\x'3u'
  2239. .as 12 \*(13
  2240. .ps \n(99
  2241. .ft \n(98
  2242. .as 12 " for each relevant object in the scene and the cost of 
  2243. .ps \n(99
  2244. .ft \n(98
  2245. \*(12
  2246. interpolating the color of the final sample.
  2247. .\" This file describes the construction of the fake spectrum.
  2248. .NH 2
  2249. Representing the Spectrum
  2250. .PP
  2251. To reproduce the spectrum, we must simulate the entire gamut of 
  2252. monochromatic colors using only the three desaturated primaries of the
  2253. graphics monitor.
  2254. Furthermore, the integral of each of the red, green, and blue curves
  2255. of our simulated spectrum must be unity, or the reconstruction of an
  2256. image from our samples will be tinted, darkened, or overdriven.
  2257. We refer to this as the \fIsumming to white\fR criterion.
  2258. .PP
  2259. As we work within the \fIrgb\fR
  2260. color space, we should restate equation (9) in terms of the rgb vectors:
  2261. .EQ I (10)
  2262. .nr 99 \n(.s
  2263. .nr 98 \n(.f
  2264. .ps 12
  2265. .ft 2
  2266. .ds 11 "I
  2267. .ds 12 "t
  2268. .ds 13 "R
  2269. .as 12 \v'9u'\s-3\*(13\s+3\|\v'-9u'
  2270. .as 11 \v'18u'\s-3\*(12\s+3\v'-18u'
  2271. .ds 12 "\ 
  2272. .as 11 "\*(12
  2273. .ds 12 "\(eq
  2274. .as 11 "\*(12
  2275. .ds 12 "\ 
  2276. .as 11 "\*(12
  2277. .ds 12 \s12\v'.1m'\s+4\(is\s-4\v'-.1m'\s12
  2278. .ds 13 "\f13\fP\f18\fP\f10\fP
  2279. .ds 13 \s7\*(13\s9
  2280. .ds 14 "\f18\fP\f10\fP\f10\fP
  2281. .ds 14 \s7\*(14\s9
  2282. .nr 12 \w'\s12\*(12'
  2283. .nr 15 \n(12
  2284. .nr 13 \w'\s9\*(13'
  2285. .if \n(13>\n(15 .nr 15 \n(13
  2286. .nr 14 \w'\s9\*(14'
  2287. .if \n(14>\n(15 .nr 15 \n(14
  2288. .ds 15 \v'63u'\h'\n(15u-\n(13u/2u'\s9\*(13\s12\h'-\n(15u-\n(13u/2u'\v'-63u'\
  2289. \h'\n(15u-\n(12u/2u'\*(12\h'\n(15u-\n(12u/2u'\
  2290. \v'-93u'\h'-\n(15u-\n(14u/2u'\s9\*(14\s12\h'\n(15u-\n(14u/2u'\v'93u'\
  2291.  
  2292. .as 11 "\*(15
  2293. .ds 12 "R
  2294. .as 11 "\*(12
  2295. .ds 12 "\f1(\fP
  2296. .as 11 "\|\*(12
  2297. .ds 12 "\(*l
  2298. .as 11 "\*(12
  2299. .ds 12 "\f1)\fP
  2300. .as 11 "\*(12
  2301. .ds 12 "\|
  2302. .as 11 "\*(12
  2303. .ds 12 "T
  2304. .as 11 "\*(12
  2305. .ds 12 "\f1(\fP
  2306. .as 11 "\|\*(12
  2307. .ds 12 "\(*l
  2308. .as 11 "\*(12
  2309. .ds 12 "\f1)\fP
  2310. .as 11 "\*(12
  2311. .ds 12 "\ 
  2312. .as 11 "\*(12
  2313. .ds 12 "d
  2314. .as 11 "\*(12
  2315. .ds 12 "\(*l
  2316. .as 11 "\|\*(12
  2317. .ds 11 \x'0'\x'0-48u'\f2\s12\*(11\s\n(99\f\n(98\x'48u'
  2318. .nr 11 \w'\*(11'
  2319. .nr MK 0
  2320. .if 198>\n(.v .ne 198u
  2321. .rn 11 10
  2322. \*(10
  2323. .ps \n(99
  2324. .ft \n(98
  2325. .EN
  2326. .EQ I (11)
  2327. .nr 99 \n(.s
  2328. .nr 98 \n(.f
  2329. .ps 12
  2330. .ft 2
  2331. .ds 11 "I
  2332. .ds 12 "t
  2333. .ds 13 "G
  2334. .as 12 \v'9u'\s-3\*(13\s+3\|\v'-9u'
  2335. .as 11 \v'18u'\s-3\*(12\s+3\v'-18u'
  2336. .ds 12 "\ 
  2337. .as 11 "\*(12
  2338. .ds 12 "\(eq
  2339. .as 11 "\*(12
  2340. .ds 12 "\ 
  2341. .as 11 "\*(12
  2342. .ds 12 \s12\v'.1m'\s+4\(is\s-4\v'-.1m'\s12
  2343. .ds 13 "\f13\fP\f18\fP\f10\fP
  2344. .ds 13 \s7\*(13\s9
  2345. .ds 14 "\f18\fP\f10\fP\f10\fP
  2346. .ds 14 \s7\*(14\s9
  2347. .nr 12 \w'\s12\*(12'
  2348. .nr 15 \n(12
  2349. .nr 13 \w'\s9\*(13'
  2350. .if \n(13>\n(15 .nr 15 \n(13
  2351. .nr 14 \w'\s9\*(14'
  2352. .if \n(14>\n(15 .nr 15 \n(14
  2353. .ds 15 \v'63u'\h'\n(15u-\n(13u/2u'\s9\*(13\s12\h'-\n(15u-\n(13u/2u'\v'-63u'\
  2354. \h'\n(15u-\n(12u/2u'\*(12\h'\n(15u-\n(12u/2u'\
  2355. \v'-93u'\h'-\n(15u-\n(14u/2u'\s9\*(14\s12\h'\n(15u-\n(14u/2u'\v'93u'\
  2356.  
  2357. .as 11 "\*(15
  2358. .ds 12 "G
  2359. .as 11 "\*(12
  2360. .ds 12 "\f1(\fP
  2361. .as 11 "\|\*(12
  2362. .ds 12 "\(*l
  2363. .as 11 "\*(12
  2364. .ds 12 "\f1)\fP
  2365. .as 11 "\*(12
  2366. .ds 12 "\|
  2367. .as 11 "\*(12
  2368. .ds 12 "T
  2369. .as 11 "\*(12
  2370. .ds 12 "\f1(\fP
  2371. .as 11 "\|\*(12
  2372. .ds 12 "\(*l
  2373. .as 11 "\*(12
  2374. .ds 12 "\f1)\fP
  2375. .as 11 "\*(12
  2376. .ds 12 "\ 
  2377. .as 11 "\*(12
  2378. .ds 12 "d
  2379. .as 11 "\*(12
  2380. .ds 12 "\(*l
  2381. .as 11 "\|\*(12
  2382. .ds 11 \x'0'\x'0-48u'\f2\s12\*(11\s\n(99\f\n(98\x'48u'
  2383. .nr 11 \w'\*(11'
  2384. .nr MK 0
  2385. .if 198>\n(.v .ne 198u
  2386. .rn 11 10
  2387. \*(10
  2388. .ps \n(99
  2389. .ft \n(98
  2390. .EN
  2391. .EQ I (12)
  2392. .nr 99 \n(.s
  2393. .nr 98 \n(.f
  2394. .ps 12
  2395. .ft 2
  2396. .ds 11 "I
  2397. .ds 12 "t
  2398. .ds 13 "B
  2399. .as 12 \v'9u'\s-3\*(13\s+3\|\v'-9u'
  2400. .as 11 \v'18u'\s-3\*(12\s+3\v'-18u'
  2401. .ds 12 "\ 
  2402. .as 11 "\*(12
  2403. .ds 12 "\(eq
  2404. .as 11 "\*(12
  2405. .ds 12 "\ 
  2406. .as 11 "\*(12
  2407. .ds 12 \s12\v'.1m'\s+4\(is\s-4\v'-.1m'\s12
  2408. .ds 13 "\f13\fP\f18\fP\f10\fP
  2409. .ds 13 \s7\*(13\s9
  2410. .ds 14 "\f18\fP\f10\fP\f10\fP
  2411. .ds 14 \s7\*(14\s9
  2412. .nr 12 \w'\s12\*(12'
  2413. .nr 15 \n(12
  2414. .nr 13 \w'\s9\*(13'
  2415. .if \n(13>\n(15 .nr 15 \n(13
  2416. .nr 14 \w'\s9\*(14'
  2417. .if \n(14>\n(15 .nr 15 \n(14
  2418. .ds 15 \v'63u'\h'\n(15u-\n(13u/2u'\s9\*(13\s12\h'-\n(15u-\n(13u/2u'\v'-63u'\
  2419. \h'\n(15u-\n(12u/2u'\*(12\h'\n(15u-\n(12u/2u'\
  2420. \v'-93u'\h'-\n(15u-\n(14u/2u'\s9\*(14\s12\h'\n(15u-\n(14u/2u'\v'93u'\
  2421.  
  2422. .as 11 "\*(15
  2423. .ds 12 "B
  2424. .as 11 "\*(12
  2425. .ds 12 "\f1(\fP
  2426. .as 11 "\|\*(12
  2427. .ds 12 "\(*l
  2428. .as 11 "\*(12
  2429. .ds 12 "\f1)\fP
  2430. .as 11 "\*(12
  2431. .ds 12 "\|
  2432. .as 11 "\*(12
  2433. .ds 12 "T
  2434. .as 11 "\*(12
  2435. .ds 12 "\f1(\fP
  2436. .as 11 "\|\*(12
  2437. .ds 12 "\(*l
  2438. .as 11 "\*(12
  2439. .ds 12 "\f1)\fP
  2440. .as 11 "\*(12
  2441. .ds 12 "\ 
  2442. .as 11 "\*(12
  2443. .ds 12 "d
  2444. .as 11 "\*(12
  2445. .ds 12 "\(*l
  2446. .as 11 "\|\*(12
  2447. .ds 11 \x'0'\x'0-48u'\f2\s12\*(11\s\n(99\f\n(98\x'48u'
  2448. .nr 11 \w'\*(11'
  2449. .nr MK 0
  2450. .if 198>\n(.v .ne 198u
  2451. .rn 11 10
  2452. \*(10
  2453. .ps \n(99
  2454. .ft \n(98
  2455. .EN
  2456. .nr 99 \n(.s
  2457. .nr 98 \n(.f
  2458. .rm 12 
  2459. .as 12 "where 
  2460. .ps 12
  2461. .ft 2
  2462. .ds 13 "R
  2463. .ds 14 "\f1(\fP
  2464. .as 13 "\|\*(14
  2465. .ds 14 "\(*l
  2466. .as 13 "\*(14
  2467. .ds 14 "\f1)\fP
  2468. .as 13 "\*(14
  2469. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  2470. .as 12 \*(13
  2471. .ps \n(99
  2472. .ft \n(98
  2473. .as 12 ", 
  2474. .ps 12
  2475. .ft 2
  2476. .ds 13 "G
  2477. .ds 14 "\f1(\fP
  2478. .as 13 "\|\*(14
  2479. .ds 14 "\(*l
  2480. .as 13 "\*(14
  2481. .ds 14 "\f1)\fP
  2482. .as 13 "\*(14
  2483. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  2484. .as 12 \*(13
  2485. .ps \n(99
  2486. .ft \n(98
  2487. .as 12 ", and 
  2488. .ps 12
  2489. .ft 2
  2490. .ds 13 "B
  2491. .ds 14 "\f1(\fP
  2492. .as 13 "\|\*(14
  2493. .ds 14 "\(*l
  2494. .as 13 "\*(14
  2495. .ds 14 "\f1)\fP
  2496. .as 13 "\*(14
  2497. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  2498. .as 12 \*(13
  2499. .ps \n(99
  2500. .ft \n(98
  2501. .as 12 " are 
  2502. .ps \n(99
  2503. .ft \n(98
  2504. \*(12
  2505. the values of the R, G, and B \fItristimulus\fR functions for
  2506. the metameric color used to represent 
  2507. .nr 99 \n(.s
  2508. .nr 98 \n(.f
  2509. .rm 12 
  2510. .as 12 "the color of monochromatic light of wavelength 
  2511. .ps 12
  2512. .ft 2
  2513. .ds 13 "\(*l
  2514. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  2515. .as 12 \*(13
  2516. .ps \n(99
  2517. .ft \n(98
  2518. .as 12 ".
  2519. .ps \n(99
  2520. .ft \n(98
  2521. \*(12
  2522. When sampling at a particular frequency then, we are actually taking three 
  2523. .nr 99 \n(.s
  2524. .nr 98 \n(.f
  2525. .rm 12 
  2526. .as 12 "(red, green, and blue) samples of 
  2527. .ps 12
  2528. .ft 2
  2529. .ds 13 "T
  2530. .ds 14 "\f1(\fP
  2531. .as 13 "\|\*(14
  2532. .ds 14 "\(*l
  2533. .as 13 "\*(14
  2534. .ds 14 "\f1)\fP
  2535. .as 13 "\*(14
  2536. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  2537. .as 12 \*(13
  2538. .ps \n(99
  2539. .ft \n(98
  2540. .as 12 ".
  2541. .ps \n(99
  2542. .ft \n(98
  2543. \*(12
  2544. The distribution of the samples should be
  2545. tailored to the shape of the tristimulus
  2546. curves used in the representation of the spectrum,
  2547. with care taken to assure that 
  2548. .EQ I (13)
  2549. .nr 99 \n(.s
  2550. .nr 98 \n(.f
  2551. .ps 12
  2552. .ft 2
  2553. .ds 11 \s12\v'.3m'\s+5\(*S\s-5\v'-.3m'\s12
  2554. .ds 12 "i\|\(eq\f11\fP
  2555. .ds 13 "n
  2556. .nr 11 \w'\s12\*(11'
  2557. .nr 14 \n(11
  2558. .nr 12 \w'\s9\*(12'
  2559. .if \n(12>\n(14 .nr 14 \n(12
  2560. .nr 13 \w'\s9\*(13'
  2561. .if \n(13>\n(14 .nr 14 \n(13
  2562. .ds 14 \v'75u'\h'\n(14u-\n(12u/2u'\s9\*(12\s12\h'-\n(14u-\n(12u/2u'\v'-75u'\
  2563. \h'\n(14u-\n(11u/2u'\*(11\h'\n(14u-\n(11u/2u'\
  2564. \v'-66u'\h'-\n(14u-\n(13u/2u'\s9\*(13\s12\h'\n(14u-\n(13u/2u'\v'66u'\
  2565.  
  2566. .ds 11 "R
  2567. .as 14 "\*(11
  2568. .ds 11 "\f1(\fP
  2569. .as 14 "\|\*(11
  2570. .ds 11 "\(*l
  2571. .ds 12 "i
  2572. .as 11 \v'18u'\s-3\*(12\s+3\|\v'-18u'
  2573. .as 14 "\*(11
  2574. .ds 11 "\f1)\fP
  2575. .as 14 "\*(11
  2576. .ds 11 "\ 
  2577. .as 14 "\*(11
  2578. .ds 11 "\(eq
  2579. .as 14 "\*(11
  2580. .ds 11 "\ 
  2581. .as 14 "\*(11
  2582. .ds 11 \s12\v'.3m'\s+5\(*S\s-5\v'-.3m'\s12
  2583. .ds 12 "i\|\(eq\f11\fP
  2584. .ds 13 "n
  2585. .nr 11 \w'\s12\*(11'
  2586. .nr 15 \n(11
  2587. .nr 12 \w'\s9\*(12'
  2588. .if \n(12>\n(15 .nr 15 \n(12
  2589. .nr 13 \w'\s9\*(13'
  2590. .if \n(13>\n(15 .nr 15 \n(13
  2591. .ds 15 \v'75u'\h'\n(15u-\n(12u/2u'\s9\*(12\s12\h'-\n(15u-\n(12u/2u'\v'-75u'\
  2592. \h'\n(15u-\n(11u/2u'\*(11\h'\n(15u-\n(11u/2u'\
  2593. \v'-66u'\h'-\n(15u-\n(13u/2u'\s9\*(13\s12\h'\n(15u-\n(13u/2u'\v'66u'\
  2594.  
  2595. .as 14 "\*(15
  2596. .ds 11 "G
  2597. .as 14 "\*(11
  2598. .ds 11 "\f1(\fP
  2599. .as 14 "\|\*(11
  2600. .ds 11 "\(*l
  2601. .ds 12 "i
  2602. .as 11 \v'18u'\s-3\*(12\s+3\|\v'-18u'
  2603. .as 14 "\*(11
  2604. .ds 11 "\f1)\fP
  2605. .as 14 "\*(11
  2606. .ds 11 "\ 
  2607. .as 14 "\*(11
  2608. .ds 11 "\(eq
  2609. .as 14 "\*(11
  2610. .ds 11 "\ 
  2611. .as 14 "\*(11
  2612. .ds 11 \s12\v'.3m'\s+5\(*S\s-5\v'-.3m'\s12
  2613. .ds 12 "i\|\(eq\f11\fP
  2614. .ds 13 "n
  2615. .nr 11 \w'\s12\*(11'
  2616. .nr 15 \n(11
  2617. .nr 12 \w'\s9\*(12'
  2618. .if \n(12>\n(15 .nr 15 \n(12
  2619. .nr 13 \w'\s9\*(13'
  2620. .if \n(13>\n(15 .nr 15 \n(13
  2621. .ds 15 \v'75u'\h'\n(15u-\n(12u/2u'\s9\*(12\s12\h'-\n(15u-\n(12u/2u'\v'-75u'\
  2622. \h'\n(15u-\n(11u/2u'\*(11\h'\n(15u-\n(11u/2u'\
  2623. \v'-66u'\h'-\n(15u-\n(13u/2u'\s9\*(13\s12\h'\n(15u-\n(13u/2u'\v'66u'\
  2624.  
  2625. .as 14 "\*(15
  2626. .ds 11 "B
  2627. .as 14 "\*(11
  2628. .ds 11 "\f1(\fP
  2629. .as 14 "\|\*(11
  2630. .ds 11 "\(*l
  2631. .ds 12 "i
  2632. .as 11 \v'18u'\s-3\*(12\s+3\|\v'-18u'
  2633. .as 14 "\*(11
  2634. .ds 11 "\f1)\fP
  2635. .as 14 "\*(11
  2636. .ds 14 \x'0'\x'0-33u'\f2\s12\*(14\s\n(99\f\n(98\x'60u'
  2637. .nr 14 \w'\*(14'
  2638. .nr MK 0
  2639. .if 195>\n(.v .ne 195u
  2640. .rn 14 10
  2641. \*(10
  2642. .ps \n(99
  2643. .ft \n(98
  2644. .EN
  2645. .nr 99 \n(.s
  2646. .nr 98 \n(.f
  2647. .rm 11 
  2648. .as 11 "where 
  2649. .ps 12
  2650. .ft 2
  2651. .ds 12 "\(*l
  2652. .ds 13 "i
  2653. .as 12 \v'18u'\s-3\*(13\s+3\|\v'-18u'
  2654. .ds 12 \x'0'\f2\s12\*(12\s\n(99\f\n(98\x'3u'
  2655. .as 11 \*(12
  2656. .ps \n(99
  2657. .ft \n(98
  2658. .as 11 " is the wavelength of the 
  2659. .ps 12
  2660. .ft 2
  2661. .ds 12 "i
  2662. .ds 13 "th
  2663. .as 12 \v'-27u'\s-3\|\*(13\s+3\|\v'27u'
  2664. .ds 12 \x'0'\f2\s12\*(12\s\n(99\f\n(98
  2665. .as 11 \*(12
  2666. .ps \n(99
  2667. .ft \n(98
  2668. .as 11 " sample,
  2669. .ps \n(99
  2670. .ft \n(98
  2671. \*(11
  2672. .nr 99 \n(.s
  2673. .nr 98 \n(.f
  2674. .rm 11 
  2675. .as 11 "and 
  2676. .ps 12
  2677. .ft 2
  2678. .ds 12 "R\|\f1(\fP
  2679. .ds 13 "\(*l
  2680. .ds 15 "i
  2681. .as 13 \v'18u'\s-3\*(15\s+3\|\v'-18u'
  2682. .as 12 "\*(13
  2683. .ds 13 "\f1)\fP
  2684. .as 12 "\*(13
  2685. .ds 12 \x'0'\f2\s12\*(12\s\n(99\f\n(98\x'3u'
  2686. .as 11 \*(12
  2687. .ps \n(99
  2688. .ft \n(98
  2689. .as 11 ", 
  2690. .ps 12
  2691. .ft 2
  2692. .ds 12 "G\|\f1(\fP
  2693. .ds 13 "\(*l
  2694. .ds 15 "i
  2695. .as 13 \v'18u'\s-3\*(15\s+3\|\v'-18u'
  2696. .as 12 "\*(13
  2697. .ds 13 "\f1)\fP
  2698. .as 12 "\*(13
  2699. .ds 12 \x'0'\f2\s12\*(12\s\n(99\f\n(98\x'3u'
  2700. .as 11 \*(12
  2701. .ps \n(99
  2702. .ft \n(98
  2703. .as 11 ", and 
  2704. .ps 12
  2705. .ft 2
  2706. .ds 12 "B\|\f1(\fP
  2707. .ds 13 "\(*l
  2708. .ds 15 "i
  2709. .as 13 \v'18u'\s-3\*(15\s+3\|\v'-18u'
  2710. .as 12 "\*(13
  2711. .ds 13 "\f1)\fP
  2712. .as 12 "\*(13
  2713. .ds 12 \x'0'\f2\s12\*(12\s\n(99\f\n(98\x'3u'
  2714. .as 11 \*(12
  2715. .ps \n(99
  2716. .ft \n(98
  2717. .as 11 " 
  2718. .ps \n(99
  2719. .ft \n(98
  2720. \*(11
  2721. .nr 99 \n(.s
  2722. .nr 98 \n(.f
  2723. .rm 11 
  2724. .as 11 "are the red, green, and blue values, respectively, of sample 
  2725. .ps 12
  2726. .ft 2
  2727. .ds 12 "\(*l
  2728. .ds 13 "i
  2729. .as 12 \v'18u'\s-3\*(13\s+3\|\v'-18u'
  2730. .ds 12 \x'0'\f2\s12\*(12\s\n(99\f\n(98\x'3u'
  2731. .as 11 \*(12
  2732. .ps \n(99
  2733. .ft \n(98
  2734. .as 11 ".
  2735. .ps \n(99
  2736. .ft \n(98
  2737. \*(11
  2738. This equality is necessary in order to have the samples 
  2739. (at their maximum intensity values)
  2740. sum to white in the rgb color space of the graphics monitor.
  2741. .NH 3
  2742. Linear Spectrum Model
  2743. .PP
  2744. A simple representation of the spectrum, given these constraints,
  2745. is shown in Figure 4.1.
  2746. .KF
  2747. .sp 3.5i
  2748. .nr PS 10
  2749. .QP
  2750. .ls 1
  2751. .ce
  2752. Figure 4.1.  The rgb curves of the linear spectral representation.
  2753. .nr PS 12
  2754. .PP
  2755. .rs
  2756. .KE
  2757. This model has the advantage of being piecewise linear,
  2758. for fast interpolation of color, and it provides a reasonably good perceptual
  2759. representation of the spectrum.
  2760. It has the disadvantage of using a significant portion
  2761. of the power available to the red
  2762. primary, in the approximation of violet with magenta.
  2763. Violet is of higher frequency than is available with an rgb monitor and
  2764. therefore cannot be directly reproduced;
  2765. magenta is a visually acceptable substitute.
  2766. A problem with the magenta representation of violet is that edges which are
  2767. blurred by dispersion such that they should appear with the color sequence
  2768. yellow-orange-red-black, actually appear greenish-yellow-red-black.
  2769. .\" (See Plate 1.)
  2770. This is because in a white-to-black transition of this sort, the first
  2771. color to be subtracted out from the sum is violet.
  2772. When violet is represented as a sum of equal quantities of red and blue,
  2773. the subtraction of violet leaves a surplus of green.
  2774. This is a subtle effect, and escapes the notice of most viewers.
  2775. .PP
  2776. Another potential drawback of this representation of the spectrum is
  2777. the pronounced discontinuities in the first derivative of the rgb curves.
  2778. While this has the potential for causing color mach banding,
  2779. such an effect has only been observed in deliberately pathological scenes.
  2780. Yet another
  2781. problem found is that the red band in the spectrum appears too narrow,
  2782. again because some of the red energy is used to display violet.
  2783. The final problem is that the rolloff of red and violet to black is too
  2784. steep and short;
  2785. the entire curve bears no resemblance to the response curve of the
  2786. human visual system.
  2787. .PP
  2788. Despite the above drawbacks, we have found this to be a viable
  2789. representation of the visible spectrum.
  2790. .PP
  2791. We sample the representation of the spectrum
  2792. at 13 intervals centered on the vertical lines in Figure 4.1.
  2793. This provides a good basis for reconstruction of the spectrum
  2794. and preserves the summing to white property.
  2795. .\" When jittering the frequency of samples we can perform a fast linear 
  2796. .\" interpolation of the ramps to get the color appropriate to a given frequency,
  2797. .\" just where necessary (e.g., where sloped).
  2798. However, when jittering we encounter the problem
  2799. that the samples may longer sum to white.
  2800. The noise added by uncorrelated jittering
  2801. of the 13 samples will generally skew the sum;
  2802. in practice this appears as a faint colorful noise, faint enough to not be
  2803. objectionable or even usually noticeable.
  2804. (This problem could be defeated by correlating the jittering of the 13
  2805. samples, but this is computationally expensive.)
  2806. Furthermore, about half the time the sum of jittered samples of a full intensity
  2807. white point will exceed unity.
  2808. If the sum is not clamped to unity at the high end,
  2809. overflow will occur and the color of the summed samples is likely to
  2810. wrap around to black.
  2811. This problem is defeated by clamping the sum, at minimal computational cost.
  2812. .NH 3
  2813. Empirical Spectrum Model
  2814. .PP
  2815. A more rigorous approach to the construction of the
  2816. representation of the spectrum is currently under development.
  2817. This approach 
  2818. involves taking the \fIxyz\fR coordinates of the monochromatic spectral
  2819. colors and performing the appropriate linear transformation into rgb values.
  2820. Construction of the transformation matrix requires information about
  2821. the chromaticity coordinates of the specific monitor on which the spectrum
  2822. is to be displayed.\*([.19\*(.]
  2823. We use as input the xyz coordinates of monochromatic colors weighted by the
  2824. spectral radiant power distribution of the CIE standard illuminant B,
  2825. which is designed to emulate direct sunlight
  2826. (the light source for rainbows).
  2827. The following graphs are piecewise linear between samples taken at 
  2828. .nr 99 \n(.s
  2829. .nr 98 \n(.f
  2830. .rm 11 
  2831. .ps 12
  2832. .ft 2
  2833. .ds 12 "\f11\fP\f10\fP
  2834. .ds 12 \x'0'\f2\s12\*(12\s\n(99\f\n(98
  2835. .as 11 \*(12
  2836. .ps \n(99
  2837. .ft \n(98
  2838. .as 11 "nm (nanometer) intervals from 
  2839. .ps 12
  2840. .ft 2
  2841. .ds 12 "\f13\fP\f18\fP\f10\fP
  2842. .ds 12 \x'0'\f2\s12\*(12\s\n(99\f\n(98
  2843. .as 11 \*(12
  2844. .ps \n(99
  2845. .ft \n(98
  2846. .as 11 " to 
  2847. .ps 12
  2848. .ft 2
  2849. .ds 12 "\f17\fP\f17\fP\f10\fP
  2850. .ds 12 \x'0'\f2\s12\*(12\s\n(99\f\n(98
  2851. .as 11 \*(12
  2852. .ps \n(99
  2853. .ft \n(98
  2854. .as 11 " nm.\*([.27\*(.]
  2855. .ps \n(99
  2856. .ft \n(98
  2857. \*(11
  2858. .KF
  2859. .sp 3.5i
  2860. .nr PS 10
  2861. .QP
  2862. .ls 1
  2863. .ce
  2864. Figure 4.2.  The rgb curves of the empirical spectral representation.
  2865. .nr PS 12
  2866. .PP
  2867. .rs
  2868. .KE
  2869. .KF
  2870. .sp 3.5i
  2871. .nr PS 10
  2872. .QP
  2873. .ls 1
  2874. .ce
  2875. Figure 4.3.  Summed rgb values, with and without negative values.
  2876. .nr PS 12
  2877. .PP
  2878. .rs
  2879. .KE
  2880. .PP
  2881. As our rgb primaries are not fully saturated, we expect that at all points
  2882. in the spectrum at least one of the rgb values will be negative.
  2883. This is indeed what we see in the curves of Figure 4.2.
  2884. The sum of these curves, with negative values included and with negative values
  2885. clamped to zero, are shown in Figure 4.3.
  2886. A more accurate approximation to the spectrum, without negative values,
  2887. could be attained be limiting the xyz input values to the color gamut of the 
  2888. monitor.
  2889. .PP
  2890. Note that the curves in Figure 4.3 have a local minimum in the cyan area
  2891. of the spectrum.
  2892. These curves do not give an acceptable representation of the spectrum
  2893. on a monitor calibrated for perceptually linear contrast response;
  2894. the cyan and yellow colors appear far too dark.
  2895. .nr 99 \n(.s
  2896. .nr 98 \n(.f
  2897. .rm 11 
  2898. .as 11 "When adjusted with a \fIgamma correction\fR of 
  2899. .ps 12
  2900. .ft 2
  2901. .ds 12 "\f12\fP\f1.\fP\f15\fP
  2902. .ds 12 \x'0'\f2\s12\*(12\s\n(99\f\n(98
  2903. .as 11 \*(12
  2904. .ps \n(99
  2905. .ft \n(98
  2906. .as 11 " to 
  2907. .ps 12
  2908. .ft 2
  2909. .ds 12 "\f13\fP\f1.\fP\f10\fP
  2910. .ds 12 \x'0'\f2\s12\*(12\s\n(99\f\n(98
  2911. .as 11 \*(12
  2912. .ps \n(99
  2913. .ft \n(98
  2914. .as 11 ", however,
  2915. .ps \n(99
  2916. .ft \n(98
  2917. \*(11
  2918. the zero-clamped curve gives a good representation of the spectrum.
  2919. Note also that the area under the zero clamped curves should be normalized
  2920. to meet the summing to white requirement.
  2921. .NH 2
  2922. Rainbow Models
  2923. .NH 3
  2924. Impressionistic Rainbow Model
  2925. .PP
  2926. We have developed two models of the rainbow, one very simple and
  2927. impressionistic or empirical, the other comparatively complex and 
  2928. purely physical.
  2929. The former model entails using the 13 colors of our samples of the
  2930. linear spectrum model to create 13 different colors 
  2931. of fog which compose a rainbow.
  2932. The fog function is simply an asymptotic replacement of 
  2933. .nr 99 \n(.s
  2934. .nr 98 \n(.f
  2935. .rm 11 
  2936. .as 11 "some percentage 
  2937. .ps 12
  2938. .ft 2
  2939. .ds 12 "r
  2940. .ds 12 \x'0'\f2\s12\*(12\|\s\n(99\f\n(98
  2941. .as 11 \*(12
  2942. .ps \n(99
  2943. .ft \n(98
  2944. .as 11 " of the color value computed at the end of the ray,
  2945. .ps \n(99
  2946. .ft \n(98
  2947. \*(11
  2948. with the color value of the fog, based on the distance that the
  2949. ray has traveled:
  2950. .EQ I (14)
  2951. .nr 99 \n(.s
  2952. .nr 98 \n(.f
  2953. .ps 12
  2954. .ft 2
  2955. .ds 11 "r
  2956. .ds 12 "\ 
  2957. .as 11 "\|\*(12
  2958. .ds 12 "\(eq
  2959. .as 11 "\*(12
  2960. .ds 12 "\ 
  2961. .as 11 "\*(12
  2962. .ds 12 "e
  2963. .ds 13 "h
  2964. .ds 14 "d
  2965. .as 13 "\*(14
  2966. .ds 14 "\(sl
  2967. .as 13 "\|\*(14
  2968. .ds 14 "t
  2969. .as 13 "\*(14
  2970. .as 12 \v'-27u'\s-3\|\*(13\s+3\|\v'27u'
  2971. .as 11 "\*(12
  2972. .ds 11 \x'0'\f2\s12\*(11\s\n(99\f\n(98
  2973. .nr 11 \w'\*(11'
  2974. .nr MK 0
  2975. .if 84>\n(.v .ne 84u
  2976. .rn 11 10
  2977. \*(10
  2978. .ps \n(99
  2979. .ft \n(98
  2980. .EN
  2981. .nr 99 \n(.s
  2982. .nr 98 \n(.f
  2983. .rm 12 
  2984. .as 12 "where 
  2985. .ps 12
  2986. .ft 2
  2987. .ds 13 "h
  2988. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  2989. .as 12 \*(13
  2990. .ps \n(99
  2991. .ft \n(98
  2992. .as 12 " is a constant, 
  2993. .ps 12
  2994. .ft 2
  2995. .ds 13 "d
  2996. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  2997. .as 12 \*(13
  2998. .ps \n(99
  2999. .ft \n(98
  3000. .as 12 " is the distance, and 
  3001. .ps 12
  3002. .ft 2
  3003. .ds 13 "t
  3004. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  3005. .as 12 \*(13
  3006. .ps \n(99
  3007. .ft \n(98
  3008. .as 12 " is the \fItransmittance\fR
  3009. .ps \n(99
  3010. .ft \n(98
  3011. \*(12
  3012. .nr 99 \n(.s
  3013. .nr 98 \n(.f
  3014. .rm 12 
  3015. .as 12 "constant; note that 
  3016. .ps 12
  3017. .ft 2
  3018. .ds 13 "t
  3019. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  3020. .as 12 \*(13
  3021. .ps \n(99
  3022. .ft \n(98
  3023. .as 12 " has red, green, and blue components, usually equal.
  3024. .ps \n(99
  3025. .ft \n(98
  3026. \*(12
  3027. As that distance goes to infinity, the percentage of replacement goes to 100.
  3028. The 13 colored fogs are invoked in concentric rings 
  3029. (cones, actually) around the \fIantisolar vector\fR,
  3030. e.g., the vector from the light source to the eye point.
  3031. This vector corresponds to the ray from the observer to the antisolar point
  3032. in Figure 3.3.
  3033. Each ring is a band of some angular width, at some angular offset from the 
  3034. antisolar vector.
  3035. We construct the rainbow by taking the dot product of each ray traced, with the 
  3036. antisolar vector; this dot product gives us the cosine of the angle between
  3037. the two vectors.
  3038. This cosine is then used as an index into a table of the 13 colored fogs.
  3039. The indexing function can be parameterized to vary the width and angular
  3040. placement of the rainbow.
  3041. The following C code segment implements this parameterized rainbow: 
  3042. .sp 1
  3043. .nr PS 10
  3044. .nr VS 10
  3045. .LP
  3046. .nf
  3047. .vS
  3048.         index = ( DOT(ray\*_direction, antisolar\*_ray)
  3049.                     \*- rainbow\*_angle) \f2*\fP rainbow\*_width;
  3050. 'FN if
  3051.         \*(+Kif\*(-K (jitter\*_option)
  3052.                 index += jitter(delta);
  3053. 'FN if
  3054.         \*(+Kif\*(-K ((index >= 0) && (index < FREQUENCIES))
  3055.                 Fog = Rainbow[(\*(+Kint\*(-K)index];
  3056.         \*(+Kelse\*(-K Fog = NULL;
  3057. .vE
  3058. .fi
  3059. .nr PS 12
  3060. .nr VS 12
  3061. .sp 1
  3062. .LP
  3063. where "ray_direction" and "antisolar_ray" are vectors,
  3064. "Fog" and "Rainbow[]" are 
  3065. pointers to structures for the "fog" type, and the other variables are 
  3066. floating point type.
  3067. The constant "FREQUENCIES" is equal to 13;
  3068. the function call
  3069. "jitter(delta)" returns a random value of uniform distribution in the range
  3070. [-delta/2..delta/2].
  3071. .PP
  3072. The jitter option turns a rainbow composed of concentric bands of color
  3073. to a more attractive "fuzzy" rainbow.
  3074. This jittered rainbow can look fairly realistic,
  3075. particularly when supersampling is employed to soften the noise
  3076. introduced by the jittering.
  3077. .\" (See Plate 1.)
  3078. Note that this scheme only jitters the index to the table of colored fogs,
  3079. and not the color of the fog itself;
  3080. an improvement would be to add such color jittering.
  3081. .NH 3
  3082. Physical Rainbow Model
  3083. .PP
  3084. The above approach is \fIad hoc\fR and is not really based on a dispersion
  3085. model, but it uses the spectral representation of our dispersion scheme.
  3086. A more rigorous and complex approach, yielding a more realistic result,
  3087. is to recreate Descartes' simulation using dispersion.
  3088. We will have to integrate Descartes' raindrop over the visible 
  3089. frequencies of light;
  3090. this entails ray tracing Descartes' raindrop at a variety of frequencies
  3091. and summing the results.
  3092. Clearly it is inefficient to ray trace Descartes' raindrop for every ray
  3093. spawned in the process of rendering a scene;
  3094. fortunately we can do much better than this.
  3095. We need only perform the integration over frequency of Descartes' raindrop
  3096. once, in a preprocessing step, to build a table of fogs similar to that
  3097. used in the our simpler rainbow model.
  3098. This table will need to have a relatively large number of entries, as 
  3099. a real rainbow is an illumination effect that covers most of the sky,
  3100. though mostly to a very subtle degree.
  3101. Thus we have entries for a large number of angular displacements,
  3102. over a 180 degree range.
  3103. (In practice, no fog might be required in the 10 degree interval of Alexander's
  3104. band, as no light is returned there by refraction.)
  3105. .PP
  3106. The first step in implementation of the physical model is to generate an
  3107. algorithm for ray tracing Descartes' raindrop.
  3108. This means calculating the angle of emergence and energy attenuation factor
  3109. for rays which are reflected once and twice inside the raindrop, as a 
  3110. function of the impact parameter.
  3111. The angle of emergence of a given ray is determined by the geometric optics
  3112. of reflection and refraction in a sphere,
  3113. while the energy transfer is determined by the physics of reflection and 
  3114. refraction of light as it interacts with air/water boundaries.
  3115. .PP
  3116. The geometric optics of Descartes' raindrop are illustrated in Figure 4.4.
  3117. .KF
  3118. .sp 5i
  3119. .nr PS 10
  3120. .QP
  3121. .ls 1
  3122. .ce
  3123. Figure 4.4  The geometric optics of Descartes' raindrop.
  3124. .nr PS 12
  3125. .PP
  3126. .rs
  3127. .KE
  3128. .\" .LP
  3129. .nr 99 \n(.s
  3130. .nr 98 \n(.f
  3131. .rm 12 
  3132. .as 12 "Note that we can take advantage of the equality of angles 
  3133. .ps 12
  3134. .ft 2
  3135. .ds 13 "\(*h
  3136. .ds 14 "\f11\fP
  3137. .as 13 \v'18u'\s-3\*(14\s+3\v'-18u'
  3138. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98\x'3u'
  3139. .as 12 \*(13
  3140. .ps \n(99
  3141. .ft \n(98
  3142. .as 12 " and
  3143. .ps \n(99
  3144. .ft \n(98
  3145. \*(12
  3146. .nr 99 \n(.s
  3147. .nr 98 \n(.f
  3148. .rm 12 
  3149. .ps 12
  3150. .ft 2
  3151. .ds 13 "\(*h
  3152. .ds 14 "\f12\fP
  3153. .as 13 \v'18u'\s-3\*(14\s+3\v'-18u'
  3154. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98\x'3u'
  3155. .as 12 \*(13
  3156. .ps \n(99
  3157. .ft \n(98
  3158. .as 12 ".
  3159. .ps \n(99
  3160. .ft \n(98
  3161. \*(12
  3162. Once this geometry is established, it is straightforward to program
  3163. an algorithm to trace the required rays.
  3164. .PP
  3165. For the purposes of computer graphics, we are generally not concerned with
  3166. the polarization of light, and generalizations of the Fresnel equation for
  3167. non-polarized light are usually employed.
  3168. For this simulation, however, we are more interested in physical veracity than
  3169. computational efficiency, so we choose the formulation of the
  3170. equation as it appears in equations 4, 5, and 6.
  3171. .\" This also allows us to observe the relationship of energy transfer to 
  3172. .\" polarization, for scientific interest.
  3173. .\" Graph 4.1 shows the intensity transferred as a function of frequency,
  3174. .\" for light polarized both perpendicular and parallel to the tangent plane of
  3175. .\" of the surface.
  3176. .\" .KF
  3177. .\" .sp 3i
  3178. .\" .nr PS 10
  3179. .\" .QP
  3180. .\" .ls 1
  3181. .\" .ce
  3182. .\" Graph 4.1  Intensity of transferred light at perpendicular and parallel polarizations.
  3183. .\" .nr PS 12
  3184. .\" .PP
  3185. .\" .rs
  3186. .\" .KE
  3187. .\" .LP
  3188. Note that the orientation of polarization to the surface is preserved 
  3189. through reflections and refractions in a spherical raindrop.
  3190. .PP
  3191. Also in the interest of physical accuracy, we use a nonlinear approximation
  3192. of the dispersion curve of water in our rainbow simulation.
  3193. Using actual measurements of the refractive index of water at various 
  3194. frequencies\*([.12\*(.]
  3195. .nr 99 \n(.s
  3196. .nr 98 \n(.f
  3197. .rm 12 
  3198. .as 12 "we derive constants 
  3199. .ps 12
  3200. .ft 2
  3201. .ds 13 "a
  3202. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  3203. .as 12 \*(13
  3204. .ps \n(99
  3205. .ft \n(98
  3206. .as 12 " and 
  3207. .ps 12
  3208. .ft 2
  3209. .ds 13 "b
  3210. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  3211. .as 12 \*(13
  3212. .ps \n(99
  3213. .ft \n(98
  3214. .as 12 " of Cauchy's equation for refractive index,
  3215. .ps \n(99
  3216. .ft \n(98
  3217. \*(12
  3218. .nr 99 \n(.s
  3219. .nr 98 \n(.f
  3220. .rm 12 
  3221. .as 12 "getting 
  3222. .ps 12
  3223. .ft 2
  3224. .ds 13 "a
  3225. .ds 14 "\ 
  3226. .as 13 "\|\*(14
  3227. .ds 14 "\(eq
  3228. .as 13 "\*(14
  3229. .ds 14 "\ 
  3230. .as 13 "\*(14
  3231. .ds 14 "\f11\fP\f1.\fP\f13\fP\f12\fP\f13\fP\f19\fP
  3232. .as 13 "\*(14
  3233. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  3234. .as 12 \*(13
  3235. .ps \n(99
  3236. .ft \n(98
  3237. .as 12 " and 
  3238. .ps 12
  3239. .ft 2
  3240. .ds 13 "b
  3241. .ds 14 "\ 
  3242. .as 13 "\|\*(14
  3243. .ds 14 "\(eq
  3244. .as 13 "\*(14
  3245. .ds 14 "\ 
  3246. .as 13 "\*(14
  3247. .ds 14 "\f13\fP\f11\fP\f11\fP\f16\fP\f1.\fP\f13\fP
  3248. .as 13 "\*(14
  3249. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  3250. .as 12 \*(13
  3251. .ps \n(99
  3252. .ft \n(98
  3253. .as 12 ".
  3254. .ps \n(99
  3255. .ft \n(98
  3256. \*(12
  3257. The first two elements of the Cauchy series
  3258. .EQ I (15)
  3259. .nr 99 \n(.s
  3260. .nr 98 \n(.f
  3261. .ps 12
  3262. .ft 2
  3263. .ds 11 "\(*y
  3264. .ds 12 "\ 
  3265. .as 11 "\*(12
  3266. .ds 12 "\(eq
  3267. .as 11 "\*(12
  3268. .ds 12 "\ 
  3269. .as 11 "\*(12
  3270. .ds 12 "a
  3271. .ds 13 "\(*l
  3272. .ds 14 "\f10\fP
  3273. .as 13 \v'-27u'\s-3\*(14\s+3\v'27u'
  3274. .nr 12 \w'\s12\*(12'
  3275. .nr 13 \w'\s12\*(13'
  3276. .nr 14 \n(12
  3277. .if \n(13>\n(14 .nr 14 \n(13
  3278. .nr 14 \n(14+\s12.5m\s0
  3279. .ds 12 \v'63u'\h'\n(14u-\n(13u/2u'\*(13\
  3280. \h'-\n(13u-\n(12u/2u'\v'-105u'\*(12\
  3281. \h'-\n(14u-\n(12u/2u+.1m'\v'21u'\l'\n(14u-.2m'\h'.1m'\v'21u'
  3282. .as 11 "\*(12
  3283. .ds 12 "\|
  3284. .as 11 "\*(12
  3285. .ds 12 "\|
  3286. .as 11 "\*(12
  3287. .ds 12 "\(pl
  3288. .as 11 "\*(12
  3289. .ds 12 "\|
  3290. .as 11 "\*(12
  3291. .ds 12 "\|
  3292. .as 11 "\*(12
  3293. .ds 12 "b
  3294. .ds 13 "\(*l
  3295. .ds 14 "\f12\fP
  3296. .as 13 \v'-27u'\s-3\*(14\s+3\v'27u'
  3297. .nr 12 \w'\s12\*(12'
  3298. .nr 13 \w'\s12\*(13'
  3299. .nr 14 \n(12
  3300. .if \n(13>\n(14 .nr 14 \n(13
  3301. .nr 14 \n(14+\s12.5m\s0
  3302. .ds 12 \v'63u'\h'\n(14u-\n(13u/2u'\*(13\
  3303. \h'-\n(13u-\n(12u/2u'\v'-105u'\*(12\
  3304. \h'-\n(14u-\n(12u/2u+.1m'\v'21u'\l'\n(14u-.2m'\h'.1m'\v'21u'
  3305. .as 11 "\*(12
  3306. .ds 12 "\ 
  3307. .as 11 "\*(12
  3308. .ds 12 "\(eq
  3309. .as 11 "\*(12
  3310. .ds 12 "\ 
  3311. .as 11 "\*(12
  3312. .ds 12 "a
  3313. .as 11 "\*(12
  3314. .ds 12 "\|
  3315. .as 11 "\|\*(12
  3316. .ds 12 "\|
  3317. .as 11 "\*(12
  3318. .ds 12 "\(pl
  3319. .as 11 "\*(12
  3320. .ds 12 "\|
  3321. .as 11 "\*(12
  3322. .ds 12 "\|
  3323. .as 11 "\*(12
  3324. .ds 12 "b
  3325. .ds 13 "\(*l
  3326. .ds 14 "\f12\fP
  3327. .as 13 \v'-27u'\s-3\*(14\s+3\v'27u'
  3328. .nr 12 \w'\s12\*(12'
  3329. .nr 13 \w'\s12\*(13'
  3330. .nr 14 \n(12
  3331. .if \n(13>\n(14 .nr 14 \n(13
  3332. .nr 14 \n(14+\s12.5m\s0
  3333. .ds 12 \v'63u'\h'\n(14u-\n(13u/2u'\*(13\
  3334. \h'-\n(13u-\n(12u/2u'\v'-105u'\*(12\
  3335. \h'-\n(14u-\n(12u/2u+.1m'\v'21u'\l'\n(14u-.2m'\h'.1m'\v'21u'
  3336. .as 11 "\*(12
  3337. .ds 11 \x'0'\x'0-27u'\f2\s12\*(11\s\n(99\f\n(98\x'48u'
  3338. .nr 11 \w'\*(11'
  3339. .nr MK 0
  3340. .if 177>\n(.v .ne 177u
  3341. .rn 11 10
  3342. \*(10
  3343. .ps \n(99
  3344. .ft \n(98
  3345. .EN
  3346. give a good approximation to the dispersion curve of water
  3347. .nr 99 \n(.s
  3348. .nr 98 \n(.f
  3349. .rm 12 
  3350. .as 12 "with the derived values of 
  3351. .ps 12
  3352. .ft 2
  3353. .ds 13 "a
  3354. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  3355. .as 12 \*(13
  3356. .ps \n(99
  3357. .ft \n(98
  3358. .as 12 " and 
  3359. .ps 12
  3360. .ft 2
  3361. .ds 13 "b
  3362. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  3363. .as 12 \*(13
  3364. .ps \n(99
  3365. .ft \n(98
  3366. .as 12 ":
  3367. .ps \n(99
  3368. .ft \n(98
  3369. \*(12
  3370. over the wavelength range from 405 to 670 nanometers, the calculated values
  3371. .nr 99 \n(.s
  3372. .nr 98 \n(.f
  3373. .rm 12 
  3374. .as 12 "of 
  3375. .ps 12
  3376. .ft 2
  3377. .ds 13 "\(*y
  3378. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  3379. .as 12 \*(13
  3380. .ps \n(99
  3381. .ft \n(98
  3382. .as 12 " agree with measured values to within plus or minus 
  3383. .ps 12
  3384. .ft 2
  3385. .ds 13 "\f10\fP\f1.\fP\f10\fP\f10\fP\f10\fP\f11\fP
  3386. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  3387. .as 12 \*(13
  3388. .ps \n(99
  3389. .ft \n(98
  3390. .as 12 ",
  3391. .ps \n(99
  3392. .ft \n(98
  3393. \*(12
  3394. .nr 99 \n(.s
  3395. .nr 98 \n(.f
  3396. .rm 12 
  3397. .as 12 "or 
  3398. .ps 12
  3399. .ft 2
  3400. .ds 13 "\f10\fP\f1.\fP\f18\fP
  3401. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  3402. .as 12 \*(13
  3403. .ps \n(99
  3404. .ft \n(98
  3405. .as 12 " of one percent.
  3406. .ps \n(99
  3407. .ft \n(98
  3408. \*(12
  3409. We use a refractive index of 1.0003 for air.
  3410. .PP
  3411. Our first implementation of the physical rainbow model uses samples
  3412. taken at 13 fixed, evenly spaced frequencies or wavelengths.
  3413. (We relax our rigor in the use of "frequency" and "wavelength"
  3414. here, as the visible 
  3415. spectrum is usually specified by wavelengths of light in a vacuum.)
  3416. We trace 50,000 rays per wavelength, over the range of impact parameters.
  3417. For each wavelength sampled, 
  3418. the intensities of the emerging rays are summed by angle of emergence
  3419. in a linear array of 1800 buckets.
  3420. The intensities in each bucket are then multiplied by the rgb vector
  3421. of the representative color for that wavelength and added to buckets
  3422. of a similar array of rgb intensities by angle.
  3423. After all wavelengths have been sampled, the results in the rgb array
  3424. are normalized and inverted for use in the fog function.
  3425. Unlike the \fIad hoc\fR rainbow model, the fogs used are not themselves
  3426. colored, but rather their transmittances,
  3427. .nr 99 \n(.s
  3428. .nr 98 \n(.f
  3429. .rm 12 
  3430. .ps 12
  3431. .ft 2
  3432. .ds 13 "t
  3433. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  3434. .as 12 \*(13
  3435. .ps \n(99
  3436. .ft \n(98
  3437. .as 12 " in equation (14),
  3438. .ps \n(99
  3439. .ft \n(98
  3440. \*(12
  3441. are unequal in red, green, and blue.
  3442. Thus the fogs have no intrinsic color, but red, green, and blue values
  3443. at ray endpoints are replaced at independent rates per unit distance.
  3444. This prevents unnecessary filtering by attenuation of colors behind the rainbow.
  3445. .PP
  3446. Our first approach evidences significant spectral aliasing.
  3447. Spectral aliasing is accentuated in the rainbow model, as the bright
  3448. feature at the Descartes ray is quite narrow and pronounced
  3449. for a point light source, 
  3450. resulting in thin concentric rings of color in the rainbow.
  3451. The rings are more widely spaced and therefore
  3452. more evident in the violet end of the spectrum,
  3453. as the dispersion curve is steeper at shorter wavelengths.
  3454. .PP
  3455. A second implementation employs spectral antialiasing.
  3456. Again we sample at 13 distinct frequency intervals, but we jitter the
  3457. samples within the intervals.
  3458. This approach requires that we
  3459. multiply the intensity of the ray by the interpolated rgb
  3460. value for its specific frequency, and store that vector in the rgb array
  3461. immediately, rather than using an intermediate storage array,
  3462. as the colors of individual rays will vary.
  3463. This has the effect of blurring and merging the rings produced by discrete
  3464. sampling.
  3465. .PP
  3466. Again, the process described above yields the rainbow produced by a point light
  3467. source,
  3468. thus the rings of color produced by spectral aliasing are quite narrow
  3469. and distinct.
  3470. In nature rainbows are produced by the sun, which has an angular diameter
  3471. of approximately one half of one degree.
  3472. Convolution of the final rgb tables with a (one dimensional) kernel which 
  3473. represents the disk of the sun
  3474. spreads each of the rings over one half a degree of angle.
  3475. The kernel we use is five entries wide, corresponding to the fact that 
  3476. .nr 99 \n(.s
  3477. .nr 98 \n(.f
  3478. .rm 12 
  3479. .as 12 "our fog samples are taken at 
  3480. .ps 12
  3481. .ft 2
  3482. .ds 13 "\f11\fP\(sl\f11\fP\f10\fP
  3483. .ds 14 "th
  3484. .as 13 \v'-27u'\s-3\*(14\s+3\|\v'27u'
  3485. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  3486. .as 12 \*(13
  3487. .ps \n(99
  3488. .ft \n(98
  3489. .as 12 " degree intervals.
  3490. .ps \n(99
  3491. .ft \n(98
  3492. \*(12
  3493. Since the entire angular width of the rainbow is approximately two degrees,
  3494. this blurs the rings together well enough to provide very good
  3495. spectral antialiasing.
  3496. If the area under the curve of the semicircular kernel is normalized,
  3497. there will be no net change in the density of the fog tables after the
  3498. convolution.
  3499. .PP
  3500. .\" Plate 2 shows another feature of our rainbow models.
  3501. We employ another feature of our rainbow models.
  3502. In nature, rainbows are rarely perfect arcs, in fact one most often
  3503. sees only a portion of the full rainbow arc.
  3504. Rainbows are modulated by two factors:
  3505. shadows of the clouds from which the rain is falling, 
  3506. and the distribution of the falling rain itself.
  3507. In an effort to make our rainbows look more natural,
  3508. we modulate intensity of the rainbow with Perlin's\*([.18\*(.]
  3509. "Chaos()" texture.
  3510. This is a \fIsolid\fR or \fIprocedural\fR texture which takes a vector
  3511. as input and returns a stochastic scalar quantity with a
  3512. .nr 99 \n(.s
  3513. .nr 98 \n(.f
  3514. .rm 12 
  3515. .ps 12
  3516. .ft 2
  3517. .ds 13 "\f11\fP\(sl
  3518. .ds 14 "\^f\|
  3519. .ds 15 "\f12\fP
  3520. .as 14 \v'-27u'\s-3\|\*(15\s+3\v'27u'
  3521. .as 13 "\*(14
  3522. .ds 13 \x'0'\f2\s12\*(13\s\n(99\f\n(98
  3523. .as 12 \*(13
  3524. .ps \n(99
  3525. .ft \n(98
  3526. .as 12 " power spectrum.
  3527. .ps \n(99
  3528. .ft \n(98
  3529. \*(12
  3530. .nr 99 \n(.s
  3531. .nr 98 \n(.f
  3532. .rm 12 
  3533. .as 12 ".\" e.g., it is a stochastic function 
  3534. .ps 12
  3535. .ft 2
  3536. .ds 13 "F\|\f1:\fPR
  3537. .ds 14 "\f13\fP
  3538. .as 13 \v'-27u'\s-3\|\*(14\s+3\v'27u'
  3539. .ds 14 "\(->
  3540. .as 13 "\*(14
  3541. .ds 14 "R
  3542. .as 13 "\*(14
  3543. .ds 13 \x'0'\f2\s12\*(13\|\s\n(99\f\n(98
  3544. .as 12 \*(13
  3545. .ps \n(99
  3546. .ft \n(98
  3547. .as 12 "
  3548. .ps \n(99
  3549. .ft \n(98
  3550. \*(12
  3551. .\" with spatial coherence properties.
  3552. The vector we pass to the texture is the ray direction; we use the scalar
  3553. value returned to modulate the transmittance of the rainbow fogs.
  3554. The frequency content of the Chaos() function can be parameterized for 
  3555. varying effects, and the texture can be scaled on a vertical or slanted
  3556. axis to simulate sheets of falling rain.
  3557. .\" .so efficiency
  3558. .\" .so future_work
  3559. .NH
  3560. CONCLUSION
  3561. .PP
  3562. A model of dispersive refraction within the distributed ray tracing 
  3563. paradigm has been implemented, with good subjective results.
  3564. The problem of representing the spectrum of monochromatic colors
  3565. within the rgb color space has been addressed, but not solved to
  3566. final satisfaction;
  3567. further work is called for here.
  3568. .PP
  3569. Physical and empirical/impressionistic models of the rainbow have been
  3570. developed, using the above results.
  3571. In contrast to the dispersion model, the rainbow models are relatively
  3572. efficient to render, because of their table-lookup implementation.
  3573. The rainbow models are suitable for Z-buffer rendering schemes, as well
  3574. as ray tracing.
  3575. .\" .so acknowledgements
  3576. .\" set the biblio in smaller type to save space
  3577. .\" .nr PS 10
  3578. .\" .nr VS 10
  3579. .\"    output the bibliography
  3580. .]<
  3581. .\"Besancon.R.M.-1974-1
  3582. .ds [F 1
  3583. .]-
  3584. .ds [A R. M. Besancon
  3585. .ds [T The Encyclopedia of Physics
  3586. .ds [I Van Nostrand Reinhold Company
  3587. .ds [C New York
  3588. .ds [D 1974
  3589. .nr [T 0
  3590. .nr [A 0
  3591. .nr [O 0
  3592. .][ 2 book
  3593. .\"Born.M-1980-2
  3594. .ds [F 2
  3595. .]-
  3596. .ds [A Max Born
  3597. .as [A " and Emil Wolf
  3598. .ds [T Principles of Optics
  3599. .ds [I Pergamon Press
  3600. .ds [C Oxford
  3601. .ds [D 1980
  3602. .nr [T 0
  3603. .nr [A 0
  3604. .nr [O 0
  3605. .][ 2 book
  3606. .\"Cook.R.L.-1981-3
  3607. .ds [F 3
  3608. .]-
  3609. .ds [A Robert L. Cook
  3610. .as [A " and Kenneth E. Torrance
  3611. .ds [T A Reflectance Model for Computer Graphics
  3612. .ds [J Computer Graphics
  3613. .ds [V 15
  3614. .ds [N 3
  3615. .ds [P 307-316
  3616. .nr [P 1
  3617. .ds [D August, 1981
  3618. .nr [T 0
  3619. .nr [A 0
  3620. .nr [O 0
  3621. .][ 1 journal-article
  3622. .\"Cook.R.L.-1984-4
  3623. .ds [F 4
  3624. .]-
  3625. .ds [A Robert L. Cook
  3626. .as [A ", Thomas Porter
  3627. .as [A ", and Loren Carpenter
  3628. .ds [T Distributed Ray Tracing
  3629. .ds [J Computer Graphics
  3630. .ds [V 18
  3631. .ds [N 3
  3632. .ds [P 137-145
  3633. .nr [P 1
  3634. .ds [D July, 1984
  3635. .nr [T 0
  3636. .nr [A 0
  3637. .nr [O 0
  3638. .][ 1 journal-article
  3639. .\"Cook.R.L.-1984-5
  3640. .ds [F 5
  3641. .]-
  3642. .ds [A Robert L. Cook
  3643. .ds [T Shade Trees
  3644. .ds [J Computer Graphics
  3645. .ds [V 18
  3646. .ds [N 3
  3647. .ds [P 223-230
  3648. .nr [P 1
  3649. .ds [D July, 1984
  3650. .nr [T 0
  3651. .nr [A 0
  3652. .nr [O 0
  3653. .][ 1 journal-article
  3654. .\"Cook.R.L.-1986-6
  3655. .ds [F 6
  3656. .]-
  3657. .ds [A Robert L. Cook
  3658. .ds [T Stochastic Sampling in Computer Graphics
  3659. .ds [J ACM Trans. on Graphics
  3660. .ds [V 5
  3661. .ds [N 1
  3662. .ds [P 51-72
  3663. .nr [P 1
  3664. .ds [D January, 1986
  3665. .nr [T 0
  3666. .nr [A 0
  3667. .nr [O 0
  3668. .][ 1 journal-article
  3669. .\"Cornsweet.T.N.-1970-7
  3670. .ds [F 7
  3671. .]-
  3672. .ds [A T. N. Cornsweet
  3673. .ds [T Visual Perception
  3674. .ds [I Academic Press
  3675. .ds [C New York
  3676. .ds [D 1970
  3677. .nr [T 0
  3678. .nr [A 0
  3679. .nr [O 0
  3680. .][ 2 book
  3681. .\"Fournier.A-1987-8
  3682. .ds [F 8
  3683. .]-
  3684. .ds [A Alain Fournier
  3685. .ds [T Modelling Natural Phenomena
  3686. .ds [J SIGGRAPH Course Notes
  3687. .ds [D 1987
  3688. .nr [T 0
  3689. .nr [A 0
  3690. .nr [O 0
  3691. .][ 1 journal-article
  3692. .\"Fournier.A-1987-9
  3693. .ds [F 9
  3694. .]-
  3695. .ds [A Alain Fournier
  3696. .ds [T personal communications
  3697. .ds [D 1987
  3698. .nr [T 0
  3699. .nr [A 0
  3700. .nr [O 0
  3701. .][ 0 other
  3702. .\"Greenler.R.-1980-10
  3703. .ds [F 10
  3704. .]-
  3705. .ds [A R. Greenler
  3706. .ds [T Rainbows, Halos, and Glories
  3707. .ds [I Cambridge University Press
  3708. .ds [C Cambridge
  3709. .ds [D 1980
  3710. .nr [T 0
  3711. .nr [A 0
  3712. .nr [O 0
  3713. .][ 2 book
  3714. .\"Kajiya.J.T.-1986-11
  3715. .ds [F 11
  3716. .]-
  3717. .ds [A James T. Kajiya
  3718. .ds [T The Rendering Equation
  3719. .ds [J Computer Graphics
  3720. .ds [V 20
  3721. .ds [N 4
  3722. .ds [P 143-150
  3723. .nr [P 1
  3724. .ds [D August, 1986
  3725. .nr [T 0
  3726. .nr [A 0
  3727. .nr [O 0
  3728. .][ 1 journal-article
  3729. .\"Kaye.G.W.C.-1973-12
  3730. .ds [F 12
  3731. .]-
  3732. .ds [A G. W. C. Kaye
  3733. .as [A " and T. H. Laby
  3734. .ds [T Tables of Physical and Chemical Constants, 14th Edition
  3735. .ds [P 95
  3736. .nr [P 0
  3737. .ds [I Longman Group Ltd.
  3738. .ds [C London
  3739. .ds [D 1973
  3740. .nr [T 0
  3741. .nr [A 0
  3742. .nr [O 0
  3743. .][ 2 book
  3744. .\"Lee.M.E.-1985-13
  3745. .ds [F 13
  3746. .]-
  3747. .ds [A Mark E. Lee
  3748. .as [A ", Richard A. Redner
  3749. .as [A ", and Samuel P. Uselton
  3750. .ds [T Statistically Optimized Sampling for Distributed Ray Tracing
  3751. .ds [J Computer Graphics
  3752. .ds [V 19
  3753. .ds [N 3
  3754. .ds [P 61-67
  3755. .nr [P 1
  3756. .ds [D July 1985
  3757. .ds [K stratified sampling
  3758. .nr [T 0
  3759. .nr [A 0
  3760. .nr [O 0
  3761. .][ 1 journal-article
  3762. .\"Minnaert.M.-1954-14
  3763. .ds [F 14
  3764. .]-
  3765. .ds [A M. Minnaert
  3766. .ds [T The Nature of Light and Colour in the Open Air
  3767. .ds [I Dover
  3768. .ds [C New York
  3769. .ds [D 1954
  3770. .nr [T 0
  3771. .nr [A 0
  3772. .nr [O 0
  3773. .][ 2 book
  3774. .\"Musgrave.F.K-1987-15
  3775. .ds [F 15
  3776. .]-
  3777. .ds [A F. Kenton Musgrave
  3778. .ds [T A Realistic Model of Refraction for Computer Graphics
  3779. .ds [J Masters Thesis
  3780. .ds [I University of California at Santa Cruz
  3781. .ds [C Santa Cruz, California
  3782. .ds [D September, 1987
  3783. .nr [T 0
  3784. .nr [A 0
  3785. .nr [O 0
  3786. .][ 1 journal-article
  3787. .\"Musgrave.F.K-1988-16
  3788. .ds [F 16
  3789. .]-
  3790. .ds [A F. Kenton Musgrave
  3791. .ds [T A Realistic Model of Refraction for Computer Graphics
  3792. .ds [J Modelling and Simulation on Microcomputers 1988, conference proceedings
  3793. .ds [P 37-43
  3794. .nr [P 1
  3795. .ds [I Society for Computer Simulation
  3796. .ds [C San Diego
  3797. .ds [D Feb. 1988
  3798. .nr [T 0
  3799. .nr [A 0
  3800. .nr [O 0
  3801. .][ 1 journal-article
  3802. .\"Nussenzveig.H.M-1977-17
  3803. .ds [F 17
  3804. .]-
  3805. .ds [A H. Moyses Nussenzveig
  3806. .ds [T The Theory of the Rainbow
  3807. .ds [J Scientific American
  3808. .ds [P 55-65
  3809. .nr [P 1
  3810. .ds [D April, 1977
  3811. .nr [T 0
  3812. .nr [A 0
  3813. .nr [O 0
  3814. .][ 1 journal-article
  3815. .\"Perlin.K-1985-18
  3816. .ds [F 18
  3817. .]-
  3818. .ds [A Ken Perlin
  3819. .ds [T An Image Synthesizer
  3820. .ds [J Computer Graphics
  3821. .ds [V 19
  3822. .ds [N 3
  3823. .ds [P 287-296
  3824. .nr [P 1
  3825. .ds [D July, 1985
  3826. .nr [T 0
  3827. .nr [A 0
  3828. .nr [O 0
  3829. .][ 1 journal-article
  3830. .\"Rogers.D.F.-1985-19
  3831. .ds [F 19
  3832. .]-
  3833. .ds [A D. F. Rogers
  3834. .ds [T Procedural Elements for Computer Graphics
  3835. .ds [I Mc Graw Hill
  3836. .ds [C New York
  3837. .ds [D 1985
  3838. .ds [K color spaces
  3839. .nr [T 0
  3840. .nr [A 0
  3841. .nr [O 0
  3842. .][ 2 book
  3843. .\"Slyusarev.G.G.-1984-20
  3844. .ds [F 20
  3845. .]-
  3846. .ds [A G. G. Slyusarev
  3847. .ds [T Aberration and Optical Design Theory
  3848. .ds [I Adam Hilger Ltd
  3849. .ds [C Bristol
  3850. .ds [D 1984
  3851. .nr [T 0
  3852. .nr [A 0
  3853. .nr [O 0
  3854. .][ 2 book
  3855. .\"Southall.J.P.C.-1933-21
  3856. .ds [F 21
  3857. .]-
  3858. .ds [A James P. C. Southall
  3859. .ds [T Mirrors, Prisms, and Lenses
  3860. .ds [I MacMillan Company
  3861. .ds [C New York
  3862. .ds [D 1933
  3863. .nr [T 0
  3864. .nr [A 0
  3865. .nr [O 0
  3866. .][ 2 book
  3867. .\"Sparrow.E.M.-1978-22
  3868. .ds [F 22
  3869. .]-
  3870. .ds [A Ephraim M. Sparrow
  3871. .as [A " and R. D. Cess
  3872. .ds [T Radiation Heat Transfer
  3873. .ds [P 64-68
  3874. .nr [P 1
  3875. .ds [I McGraw-Hill
  3876. .ds [C New York
  3877. .ds [D 1978
  3878. .nr [T 0
  3879. .nr [A 0
  3880. .nr [O 0
  3881. .][ 2 book
  3882. .\"Thomas.S.W.-1986-23
  3883. .ds [F 23
  3884. .]-
  3885. .ds [A Spencer W. Thomas
  3886. .ds [T Dispersive Refraction in Ray Tracing
  3887. .ds [J Visual Computer
  3888. .ds [V 2
  3889. .ds [N 1
  3890. .ds [I Springer International
  3891. .ds [P 3-8
  3892. .nr [P 1
  3893. .ds [D January, 1986
  3894. .nr [T 0
  3895. .nr [A 0
  3896. .nr [O 0
  3897. .][ 1 journal-article
  3898. .\"Whitted.T-1980-24
  3899. .ds [F 24
  3900. .]-
  3901. .ds [A Turner Whitted
  3902. .ds [T An Improved Illumination Model for Shaded Display
  3903. .ds [J CACM
  3904. .ds [V 23
  3905. .ds [N 6
  3906. .ds [P 343-349
  3907. .nr [P 1
  3908. .ds [D June, 1980
  3909. .nr [T 0
  3910. .nr [A 0
  3911. .nr [O 0
  3912. .][ 1 journal-article
  3913. .\"Whitted.T-1987-25
  3914. .ds [F 25
  3915. .]-
  3916. .ds [A Turner Whitted
  3917. .ds [T personal communications
  3918. .ds [D 1987
  3919. .nr [T 0
  3920. .nr [A 0
  3921. .nr [O 0
  3922. .][ 0 other
  3923. .\"Wood.R.W.-1911-26
  3924. .ds [F 26
  3925. .]-
  3926. .ds [A Robert W. Wood
  3927. .ds [T Physical Optics
  3928. .ds [I MacMillan Company
  3929. .ds [C New York
  3930. .ds [D 1911
  3931. .nr [T 0
  3932. .nr [A 0
  3933. .nr [O 0
  3934. .][ 2 book
  3935. .\"Wyszecki.G.-1967-27
  3936. .ds [F 27
  3937. .]-
  3938. .ds [A G. Wyszecki
  3939. .as [A " and W. S. Stiles
  3940. .ds [T Color Science: Concepts and Methods, Quantitative Methods and Formulas
  3941. .ds [I Wiley-Interscience
  3942. .ds [C New York
  3943. .ds [D 1967
  3944. .nr [T 0
  3945. .nr [A 0
  3946. .nr [O 0
  3947. .][ 2 book
  3948. .]>
  3949. .\"    output the table of contents
  3950. .\" .TC
  3951. 'ps 10
  3952. 'vs 11
  3953. '-F
  3954. .()
  3955. .bp
  3956.