1
0
mirror of https://github.com/ssloy/tinyraytracer.git synced 2025-08-30 17:30:14 +02:00

Updated Home (markdown)

Dmitry V. Sokolov
2019-01-20 18:54:28 +01:00
parent 801b403cc4
commit abd78f2b1d

14
Home.md

@@ -56,7 +56,7 @@ So, the goal of this step is to make sure that we can a) create an image in memo
<img src="https://raw.githubusercontent.com/ssloy/tinyraytracer/bd36c9857305b3cbd06f5b768bb48a92df9ae68b/out.jpg"/>
<h1>Step 2, the crucial one: ray tracing</h1>
This is the most important and difficult step of the whole chain. I want to define one sphere in my code and show it on the screen without being obsessed with materials or lighting. This is how our result should look like:
This is the most important and difficult step of the whole chain. I want to define one sphere in my code and draw it without being obsessed with materials or lighting. This is how our result should look like:
<img src="https://raw.githubusercontent.com/ssloy/tinyraytracer/5806eb45e93dab225ab335824cbc3f537d511b28/out.jpg"/>
For the sake of convenience, I have one commit per step in my repository; Github makes it very easy to view the changes made. <a href="https://github.com/ssloy/tinyraytracer/commit/5806eb45e93dab225ab335824cbc3f537d511b28">Here, for instance</a>, what was changed by the second commit.
@@ -122,13 +122,13 @@ void render(const Sphere &sphere) {
}
```
На этом месте рекомендую взять карандаш и проверить на бумаге все вычисления, как пересечение луча со сферой, так и заметание картинки лучами. На всякий случай, наша камера определяется следующими вещами:
At this point, I recommend you to take a pencil and check on paper all the calculations (the ray-sphere intersection and the sweeping of the picture with the rays). Just in case, our camera is determined by the following things:
<ul>
<li>ширина картинки, width</li>
<li>высота картинки, height</li>
<li>угол обзора, fov</li>
<li>расположение камеры, Vec3f(0,0,0)</li>
<li>направление взора, вдоль оси z, в направлении минус бесконечности</li>
<li>picture width</li>
<li>picture height</li>
<li>field of view angle</li>
<li>camera location, Vec3f(0.0.0)</li>
<li>view direction, along the z-axis, in the direction of minus infinity</li>
</ul>
<h1>Этап третий: добавляем ещё сфер</h1>