Skip to content

Commit 4d24032

Browse files
committed
Fix broken <div class='together'> spans
1 parent c6c3700 commit 4d24032

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

books/RayTracingTheNextWeek.html

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,8 @@
380380
<kbd>[main.cc]</kbd> Last book's final scene, but with moving spheres]
381381
</div>
382382

383-
gives the following result:
383+
<div class='together'>
384+
This gives the following result:
384385

385386
![Image 1: Bouncing spheres](../images/img-2.01-bouncing-spheres.png class=pixel)
386387

@@ -1428,8 +1429,6 @@
14281429
[Listing [get-sphere-uv-call]: <kbd>[sphere.h]</kbd> Sphere UV coordinates from hit]
14291430
</div>
14301431

1431-
<div class='together'>
1432-
14331432
<div class='together'>
14341433
Now we can make textured materials by replacing the `const color& a` with a texture pointer:
14351434

@@ -2008,7 +2007,9 @@
20082007
[Listing [scale-perlin]: <kbd>[main.cc]</kbd> Perlin-textured spheres with a scale to the noise]
20092008
</div>
20102009

2011-
which gives:
2010+
2011+
<div class='together'>
2012+
This yields the following result:
20122013

20132014
![Image 12: Perlin texture, higher frequency](../images/img-2.12-perlin-hifreq.png class=pixel)
20142015

@@ -2302,6 +2303,7 @@
23022303

23032304
![Figure [quad-def]: Quadrilateral Components](../images/fig-2.05-quad-def.jpg)
23042305

2306+
<div class='together'>
23052307
Quads are flat, which means that their axis-aligned bounding box can have zero thickness in one
23062308
dimension (if the quad lies in one of the XY, YZ, or ZX planes). This can lead to numerical problems
23072309
with ray intersection, but we can address this by padding any zero-sized dimensions of the bounding
@@ -2331,7 +2333,9 @@
23312333
}
23322334
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23332335
[Listing [aabb]: <kbd>[aabb.h]</kbd> New aabb::pad() method]
2336+
</div>
23342337

2338+
<div class='together'>
23352339
Now we're ready for the first sketch of the new `quad` class:
23362340

23372341
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
@@ -2370,6 +2374,7 @@
23702374
#endif
23712375
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23722376
[Listing [quad]: <kbd>[quad.h]</kbd> 2D quadrilateral (parallelogram) class]
2377+
</div>
23732378

23742379

23752380
Ray-Plane Intersection
@@ -2873,7 +2878,6 @@
28732878

28742879
Adding Background Color to the Ray Color Function
28752880
--------------------------------------------------
2876-
<div class='together'>
28772881
Next, we want a pure black background so the only light in the scene is coming from the emitters. To
28782882
do this, we’ll add a background color parameter to our `ray_color` function, and pay attention to
28792883
the new `emitted` value.
@@ -2946,8 +2950,6 @@
29462950
bluish-white for the whole sky. You could always pass in a boolean to switch between the previous
29472951
skybox code versus the new solid color background. We're keeping it simple here.
29482952

2949-
</div>
2950-
29512953

29522954
Turning Objects into Lights
29532955
----------------------------
@@ -3349,7 +3351,6 @@
33493351
3. Change the intersection point from object space to world space
33503352

33513353

3352-
<div class='together'>
33533354
Rotating an object will not only change the point of intersection, but will also change the surface
33543355
normal vector, which will change the direction of reflections and refractions. So we need to change
33553356
the normal as well. Fortunately, the normal will rotate similarly to a vector, so we can use the
@@ -3409,7 +3410,6 @@
34093410
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34103411
[Listing [rot-y-hit]: <kbd>[hittable.h]</kbd> Hittable rotate-Y hit function]
34113412

3412-
</div>
34133413
... and now for the rest of the class:
34143414

34153415
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
@@ -3528,7 +3528,6 @@
35283528
$$ \text{probability} = C \cdot \Delta L $$
35293529
</div>
35303530

3531-
<div class='together'>
35323531
where $C$ is proportional to the optical density of the volume. If you go through all the
35333532
differential equations, for a random number you get a distance where the scattering occurs. If that
35343533
distance is outside the volume, then there is no “hit”. For a constant volume we just need the
@@ -3612,7 +3611,6 @@
36123611
#endif
36133612
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36143613
[Listing [const-med-class]: <kbd>[constant_medium.h]</kbd> Constant medium class]
3615-
</div>
36163614

36173615
<div class='together'>
36183616
The scattering function of isotropic picks a uniform random direction:
@@ -3650,7 +3648,6 @@
36503648

36513649
Rendering a Cornell Box with Smoke and Fog Boxes
36523650
-------------------------------------------------
3653-
<div class='together'>
36543651
If we replace the two blocks with smoke and fog (dark and light particles), and make the light
36553652
bigger (and dimmer so it doesn’t blow out the scene) for faster convergence:
36563653

@@ -3717,7 +3714,6 @@
37173714
}
37183715
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37193716
[Listing [cornell-smoke]: <kbd>[main.cc]</kbd> Cornell box, with smoke]
3720-
</div>
37213717

37223718
<div class='together'>
37233719
We get:

0 commit comments

Comments
 (0)