Finish writeup

This commit is contained in:
Michael Zhang 2023-02-17 03:07:11 -06:00
parent 65359c8627
commit 87ba3b4cf4

View file

@ -57,14 +57,24 @@ decreases in brightness when all other factors remain constant.
## Varying $k_d$ ## Varying $k_d$
TODO $k_d$ is the strength of the diffuse component. It also affects an object's
diffuse color, but at a strength that's affected by how much of it faces the
light. Much like the dark side of the moon, the parts of the object that aren't
pointed at the light will not receive as much of the light's influence. In the
image below, I varied $k_d$ between 0.2 and 1. Note how the part pointed to the
light changes the strength of the brightness as all other factors remain
constant.
![Varying $k_d$](examples/kd-demo.png){width=360px} ![Varying $k_d$](examples/kd-demo.png){width=360px}
\ \
## Varying $k_s$ ## Varying $k_s$
TODO $k_s$ is the specular strength. It uses the object's specular color, which is
like its reflective component. When there is a large specular $k_s$, there's a
shine that appears on the object with a greater intensity. In the image below, I
varied $k_s$ between 0.2 and 1. Note how the whiteness of the light is more
reflective in higher $k_s$ values as other factors remain constant.
![Varying $k_s$](examples/ks-demo.png){width=360px} ![Varying $k_s$](examples/ks-demo.png){width=360px}
\ \
@ -74,7 +84,8 @@ TODO
$n$ is the exponent saying how big the radius of the specular highlight should $n$ is the exponent saying how big the radius of the specular highlight should
be. In the equation, increasing the exponent usually leads to smaller shines. In be. In the equation, increasing the exponent usually leads to smaller shines. In
the image below, I varied $n$ between 2 and 100. Note how the size of the shine the image below, I varied $n$ between 2 and 100. Note how the size of the shine
is more focused but covers a smaller area as $n$ increases. is the same intensity, but more focused but covers a smaller area as $n$
increases.
![Varying $n$](examples/n-demo.png){width=360px} ![Varying $n$](examples/n-demo.png){width=360px}
\ \
@ -142,9 +153,21 @@ are away from the eye.
## Shortcomings of the model ## Shortcomings of the model
The model cannot be used to represent TODO The Phong formula is just a model of how light works, and doesn't actually
represent reality. There's not actually rays physically escaping our eyes and
hitting objects; it's actually the other way around, but computing it that way
would not be efficient since we would be factoring in a lot of rays that don't
ever get rendered.
Also, one needs to take care to use reasonable constants. For example, if using
a different specular light color than the diffuse color, then it may produce
some bizarre lighting effects that may not actually look right compare to
reality.
# Arbitrary Objects # Arbitrary Objects
Here is an example scene with some objects that demonstrates some of the
features of the raytracer.
![Objects in the scene](examples/objects.png){width=360px} ![Objects in the scene](examples/objects.png){width=360px}
\ \