Skip to content

Commit cb01f86

Browse files
committed
Update simple red sphere image
- fix code listing highlighting - update image
1 parent e6eaee4 commit cb01f86

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

books/RayTracingInOneWeekend.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@
567567
If we take that math and hard-code it into our program, we can test it by coloring red any pixel
568568
that hits a small sphere we place at -1 on the z-axis:
569569

570-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
570+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
571571
bool hit_sphere(const vec3& center, double radius, const ray& r) {
572572
vec3 oc = r.origin() - center;
573573
auto a = dot(r.direction(), r.direction());
@@ -578,8 +578,9 @@
578578
}
579579

580580

581-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
581+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
582582
vec3 ray_color(const ray& r) {
583+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
583584
if (hit_sphere(vec3(0,0,-1), 0.5, r))
584585
return vec3(1, 0, 0);
585586
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++

images/img.red-sphere.png

9.87 KB
Loading

0 commit comments

Comments
 (0)