Skip to content

Commit ef5a39e

Browse files
authored
Merge pull request #520 from RayTracing/figure-renames
Figure renames
2 parents 51cf851 + 2cee959 commit ef5a39e

37 files changed

+41
-35
lines changed

books/RayTracingInOneWeekend.html

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
write it to a file. The catch is, there are so many formats. Many of those are complex. I always
7070
start with a plain text ppm file. Here’s a nice description from Wikipedia:
7171

72-
![](../images/img.ppm-example.jpg)
72+
![Figure [ppm]: PPM Example](../images/fig-1.01-ppm.jpg)
7373

7474
<div class='together'>
7575
Let’s make some C++ code to output such a thing:
@@ -418,7 +418,7 @@
418418
can go anywhere on the 3D line. For positive $t$, you get only the parts in front of $\mathbf{A}$,
419419
and this is what is often called a half-line or ray.
420420

421-
![Figure [lerp]: Linear interpolation](../images/fig.lerp.jpg)
421+
![Figure [lerp]: Linear interpolation](../images/fig-1.02-lerp.jpg)
422422

423423
</div>
424424

@@ -473,7 +473,7 @@
473473
sides to move the ray endpoint across the screen. Note that I do not make the ray direction a unit
474474
length vector because I think not doing that makes for simpler and slightly faster code.
475475

476-
![Figure [cam-geom]: Camera geometry](../images/fig.cam-geom.jpg)
476+
![Figure [cam-geom]: Camera geometry](../images/fig-1.03-cam-geom.jpg)
477477

478478
<div class='together'>
479479
Below in code, the ray `r` goes to approximately the pixel centers (I won’t worry about exactness
@@ -611,7 +611,7 @@
611611
(meaning no real solutions), or zero (meaning one real solution). In graphics, the algebra almost
612612
always relates very directly to the geometry. What we have is:
613613

614-
![Figure [ray-sphere]: Ray-sphere intersection results](../images/fig.ray-sphere.jpg)
614+
![Figure [ray-sphere]: Ray-sphere intersection results](../images/fig-1.04-ray-sphere.jpg)
615615

616616
</div>
617617

@@ -676,7 +676,7 @@
676676
personal preference as are most design decisions like that. For a sphere, the outward normal is in
677677
the direction of the hit point minus the center:
678678

679-
![Figure [surf-normal]: Sphere surface-normal geometry](../images/fig.sphere-normal.jpg)
679+
![Figure [sphere-normal]: Sphere surface-normal geometry](../images/fig-1.05-sphere-normal.jpg)
680680

681681
<div class='together'>
682682
On the earth, this implies that the vector from the earth’s center to you points straight up. Let’s
@@ -886,8 +886,8 @@
886886
the sphere, the normal will point outward, but if the ray is inside the sphere, the normal will
887887
point inward.
888888

889-
![Figure [normal-directions]: Possible directions for sphere surface-normal geometry
890-
](../images/fig.normal-possibilities.jpg)
889+
![Figure [normal-sides]: Possible directions for sphere surface-normal geometry
890+
](../images/fig-1.06-normal-sides.jpg)
891891

892892
</div>
893893

@@ -1308,7 +1308,7 @@
13081308
For a given pixel we have several samples within that pixel and send rays through each of the
13091309
samples. The colors of these rays are then averaged:
13101310

1311-
![Figure [pixel-samples]: Pixel samples](../images/fig.pixel-samples.jpg)
1311+
![Figure [pixel-samples]: Pixel samples](../images/fig-1.07-pixel-samples.jpg)
13121312

13131313
</div>
13141314

@@ -1452,7 +1452,7 @@
14521452
direction randomized. So, if we send three rays into a crack between two diffuse surfaces they will
14531453
each have different random behavior:
14541454

1455-
![Figure [light-bounce]: Light ray bounces](../images/fig.light-bounce.jpg)
1455+
![Figure [light-bounce]: Light ray bounces](../images/fig-1.08-light-bounce.jpg)
14561456

14571457
</div>
14581458

@@ -1476,7 +1476,7 @@
14761476
from the hit point $\mathbf{P}$ to the random point $\mathbf{S}$ (this is the vector
14771477
$(\mathbf{S}-\mathbf{P})$):
14781478

1479-
![Figure [rand-vector]: Generating a random diffuse bounce ray](../images/fig.rand-vector.jpg)
1479+
![Figure [rand-vec]: Generating a random diffuse bounce ray](../images/fig-1.09.rand-vec.jpg)
14801480

14811481
</div>
14821482

@@ -1693,7 +1693,7 @@
16931693
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16941694
[Listing [random-unit-vector]: <kbd>[vec3.h]</kbd> The random_unit_vector() function]
16951695

1696-
![Figure [rand-unit-vector]: Generating a random unit vector](../images/fig.rand-unitvector.png)
1696+
![Figure [rand-unitvec]: Generating a random unit vector](../images/fig-1.10-rand-unitvec.png)
16971697

16981698
</div>
16991699

@@ -2006,7 +2006,7 @@
20062006
For smooth metals the ray won’t be randomly scattered. The key math is: how does a ray get
20072007
reflected from a metal mirror? Vector math is our friend here:
20082008

2009-
![Figure [reflection]: Ray reflection](../images/fig.ray-reflect.jpg)
2009+
![Figure [reflection]: Ray reflection](../images/fig-1.11-reflection.jpg)
20102010

20112011
</div>
20122012

@@ -2141,7 +2141,7 @@
21412141
We can also randomize the reflected direction by using a small sphere and choosing a new endpoint
21422142
for the ray:
21432143

2144-
![Figure [reflect-fuzzy]: Generating fuzzed reflection rays](../images/fig.reflect-fuzzy.jpg)
2144+
![Figure [reflect-fuzzy]: Generating fuzzed reflection rays](../images/fig-1.12-reflect-fuzzy.jpg)
21452145

21462146
</div>
21472147

@@ -2224,7 +2224,7 @@
22242224
"eta" and "eta prime") are the refractive indices (typically air = 1.0, glass = 1.3–1.7, diamond =
22252225
2.4). The geometry is:
22262226

2227-
![Figure [ray-refract]: Refracted ray geometry](../images/fig.ray-refract.jpg)
2227+
![Figure [refraction]: Ray refraction](../images/fig-1.13-refraction.jpg)
22282228

22292229
</div>
22302230

@@ -2536,7 +2536,7 @@
25362536
I first keep the rays coming from the origin and heading to the $z = -1$ plane. We could make it the
25372537
$z = -2$ plane, or whatever, as long as we made $h$ a ratio to that distance. Here is our setup:
25382538

2539-
![Figure [cam-view-geom]: Camera viewing geometry](../images/fig.cam-view-geom.jpg)
2539+
![Figure [cam-view-geom]: Camera viewing geometry](../images/fig-1.14-cam-view-geom.jpg)
25402540

25412541
</div>
25422542

@@ -2607,14 +2607,14 @@
26072607
constant, you can still rotate your head around your nose. What we need is a way to specify an “up”
26082608
vector for the camera. This up vector should lie in the plane orthogonal to the view direction.
26092609

2610-
![Figure [cam-look]: Camera view direction](../images/fig.cam-look.jpg)
2610+
![Figure [cam-view-dir]: Camera view direction](../images/fig-1.15-cam-view-dir.jpg)
26112611

26122612
We can actually use any up vector we want, and simply project it onto this plane to get an up vector
26132613
for the camera. I use the common convention of naming a “view up” (_vup_) vector. A couple of cross
26142614
products, and we now have a complete orthonormal basis $(u,v,w)$ to describe our camera’s
26152615
orientation.
26162616

2617-
![Figure [cam-up]: Camera view up direction](../images/fig.cam-up.jpg)
2617+
![Figure [cam-view-up]: Camera view up direction](../images/fig-1.16-cam-view-up.jpg)
26182618

26192619
Remember that `vup`, `v`, and `w` are all in the same plane. Note that, like before when our fixed
26202620
camera faced -Z, our arbitrary view camera faces -w. And keep in mind that we can -- but we don’t
@@ -2721,7 +2721,7 @@
27212721
it's computed (the image is projected upside down on the film). Graphics people, however, usually
27222722
use a thin lens approximation:
27232723

2724-
![Figure [cam-lens]: Camera lens model](../images/fig.cam-lens.jpg)
2724+
![Figure [cam-lens]: Camera lens model](../images/fig-1.17-cam-lens.jpg)
27252725

27262726
</div>
27272727

@@ -2731,7 +2731,7 @@
27312731
surface of the lens, and send them toward a virtual film plane, by finding the projection of the
27322732
film on the plane that is in focus (at the distance `focus_dist`).
27332733

2734-
![Figure [cam-film-plane]: Camera focus plane](../images/fig.cam-film-plane.jpg)
2734+
![Figure [cam-film-plane]: Camera focus plane](../images/fig-1.18-cam-film-plane.jpg)
27352735

27362736
</div>
27372737

books/RayTracingTheNextWeek.html

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@
401401
divided a set of objects into two groups, red and blue, and used rectangular bounding volumes, we’d
402402
have:
403403

404-
![Figure [bvol-hierarchy]: Bounding volume hierarchy](../images/fig.bvol-hierarchy.jpg)
404+
![Figure [bvol-hierarchy]: Bounding volume hierarchy](../images/fig-2.01-bvol-hierarchy.jpg)
405405

406406
</div>
407407

@@ -440,7 +440,7 @@
440440
points between two endpoints, _e.g._, $x$ such that $3 < x < 5$, or more succinctly $x$ in $(3,5)$.
441441
In 2D, two intervals overlapping makes a 2D AABB (a rectangle):
442442

443-
![Figure [2daabb]: 2D axis-aligned bounding box](../images/fig.2daabb.jpg)
443+
![Figure [2d-aabb]: 2D axis-aligned bounding box](../images/fig-2.02-2d-aabb.jpg)
444444

445445
</div>
446446

@@ -449,7 +449,7 @@
449449
example, again in 2D, this is the ray parameters $t_0$ and $t_1$. (If the ray is parallel to the
450450
plane those will be undefined.)
451451

452-
![Figure [ray-slab]: Ray-slab intersection](../images/fig.ray-slab.jpg)
452+
![Figure [ray-slab]: Ray-slab intersection](../images/fig-2.03-ray-slab.jpg)
453453

454454
</div>
455455

@@ -484,7 +484,8 @@
484484
The key observation to turn that 1D math into a hit test is that for a hit, the $t$-intervals need
485485
to overlap. For example, in 2D the green and blue overlapping only happens if there is a hit:
486486

487-
![Figure [rstio]: Ray-slab $t$-interval overlap](../images/fig.rstio.jpg)
487+
![Figure [ray-slab-interval]: Ray-slab $t$-interval overlap
488+
](../images/fig-2.04-ray-slab-interval.jpg)
488489

489490
</div>
490491

@@ -1917,7 +1918,7 @@
19171918
First, here is a rectangle in an xy plane. Such a plane is defined by its z value. For example, $z =
19181919
k$. An axis-aligned rectangle is defined by the lines $x=x_0$, $x=x_1$, $y=y_0$, and $y=y_1$.
19191920

1920-
![Figure [ray-rect]: Ray-rectangle intersection](../images/fig.ray-rect.jpg)
1921+
![Figure [ray-rect]: Ray-rectangle intersection](../images/fig-2.05-ray-rect.jpg)
19211922

19221923
</div>
19231924

@@ -2338,7 +2339,7 @@
23382339
or (as we almost always do in ray tracing) leave the box where it is, but in its hit routine
23392340
subtract 2 off the x-component of the ray origin.
23402341

2341-
![Figure [ray-box]: Ray-box intersection with moved ray vs box](../images/fig.ray-box.jpg)
2342+
![Figure [ray-box]: Ray-box intersection with moved ray vs box](../images/fig-2.06-ray-box.jpg)
23422343

23432344
</div>
23442345

@@ -2397,7 +2398,7 @@
23972398
First, let’s rotate by theta about the z-axis. That will be changing only x and y, and in ways that
23982399
don’t depend on z.
23992400

2400-
![Figure [rotz]: Rotation about the Z axis](../images/fig.rotz.jpg)
2401+
![Figure [rot-z]: Rotation about the Z axis](../images/fig-2.07-rot-z.jpg)
24012402

24022403
</div>
24032404

@@ -2578,7 +2579,7 @@
25782579
far the ray has to travel through the volume also determines how likely it is for the ray to make it
25792580
through.
25802581

2581-
![Figure [ray-vol]: Ray-volume interaction](../images/fig.ray-vol.jpg)
2582+
![Figure [ray-vol]: Ray-volume interaction](../images/fig-2.08-ray-vol.jpg)
25822583

25832584
<div class='together'>
25842585
As the ray passes through the volume, it may scatter at any point. The denser the volume, the more

books/RayTracingTheRestOfYourLife.html

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@
5252
problem being a classic case study. We’ll do a variation inspired by that. Suppose you have a circle
5353
inscribed inside a square:
5454

55-
![Figure [circ-sq]: Estimating π with a circle inside a square](../images/fig.circ-sq.jpg)
55+
![Figure [circ-square]: Estimating π with a circle inside a square
56+
](../images/fig-3.01-circ-square.jpg)
5657

5758
</div>
5859

@@ -139,7 +140,7 @@
139140
We can mitigate this diminishing return by *stratifying* the samples (often called *jittering*),
140141
where instead of taking random samples, we take a grid and take one sample within each:
141142
142-
![Figure [jitter]: Sampling areas with jittered points](../images/fig.jitter.jpg)
143+
![Figure [jitter]: Sampling areas with jittered points](../images/fig-3.02-jitter.jpg)
143144
144145
</div>
145146
@@ -270,7 +271,7 @@
270271
First, what is a _density function_? It’s just a continuous form of a histogram. Here’s an example
271272
from the histogram Wikipedia page:
272273
273-
![Figure [histogram]: Histogram example](../images/fig.histogram.jpg)
274+
![Figure [histogram]: Histogram example](../images/fig-3.03-histogram.jpg)
274275
275276
</div>
276277
@@ -303,7 +304,7 @@
303304
between 0 and 2 whose probability is proportional to itself: $r$. We would expect the PDF $p(r)$ to
304305
look something like the figure below, but how high should it be?
305306
306-
![Figure [linear-pdf]: A linear PDF](../images/fig.linear-pdf.jpg)
307+
![Figure [linear-pdf]: A linear PDF](../images/fig-3.04-linear-pdf.jpg)
307308
308309
<div class='together'>
309310
The height is just $p(2)$. What should that be? We could reasonably make it anything by
@@ -605,7 +606,8 @@
605606
goes through. The solid angle $\omega$ and the projected area $A$ on the unit sphere are the same
606607
thing.
607608

608-
![Figure [solid-angle]: Solid angle / projected area of a sphere](../images/fig.solid-angle.jpg)
609+
![Figure [solid-angle]: Solid angle / projected area of a sphere
610+
](../images/fig-3.05-solid-angle.jpg)
609611

610612
Now let’s go on to the light transport equation we are solving.
611613

@@ -1055,7 +1057,8 @@
10551057
<div class='together'>
10561058
And plot them for free on plot.ly (a great site with 3D scatterplot support):
10571059

1058-
![Figure [pt-uni-sphere]: Random points on the unit sphere](../images/fig.pt-uni-sphere.jpg)
1060+
![Figure [rand-pts-sphere]: Random points on the unit sphere
1061+
](../images/fig-3.06-rand-pts-sphere.jpg)
10591062

10601063
</div>
10611064

@@ -1336,7 +1339,8 @@
13361339
is $\frac{1}{A}$. What is it on the area of the unit sphere that defines directions? Fortunately,
13371340
there is a simple correspondence, as outlined in the diagram:
13381341

1339-
![Figure [light-pdf]: Projection of light shape onto PDF](../images/fig.light-pdf.jpg)
1342+
![Figure [shape-onto-pdf]: Projection of light shape onto PDF
1343+
](../images/fig-3.07-shape-onto-pdf.jpg)
13401344

13411345
</div>
13421346

@@ -2196,7 +2200,8 @@
21962200
<div class='together'>
21972201
Now what is $\theta_{max}$?
21982202

2199-
![Figure [sphere-cone]: A sphere enclosing cone](../images/fig.sphere-cone.jpg)
2203+
![Figure [sphere-enclosing-cone]: A sphere-enclosing cone
2204+
](../images/fig-3.08-sphere-enclosing-cone.jpg)
22002205

22012206
</div>
22022207

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)