2023-02-06 03:52:42 +00:00
|
|
|
---
|
|
|
|
geometry: margin=2cm
|
|
|
|
output: pdf_document
|
|
|
|
---
|
|
|
|
|
2023-02-15 08:36:53 +00:00
|
|
|
This project implements a raytracer with Blinn-Phong illumination implemented.
|
|
|
|
The primary formula that is used by this implementation is:
|
|
|
|
|
|
|
|
$$
|
|
|
|
I_{\lambda} = k_a O_{d\lambda} +
|
|
|
|
\sum_{i=1}^{n_\textrm{lights}} \left(
|
|
|
|
IL_{i\lambda} \left[
|
|
|
|
k_d O_{d\lambda} \textrm{max} \{
|
|
|
|
% 0, \overrightarrow{N} \middot \vec{L_i}
|
|
|
|
\}
|
|
|
|
\right]
|
|
|
|
\right)
|
|
|
|
$$
|
|
|
|
|
2023-02-06 03:52:42 +00:00
|
|
|
## Varying $k_a$
|
|
|
|
|
|
|
|
![Varying $k_a$](examples/ka-demo.png){width=240px}
|
|
|
|
|
|
|
|
## Varying $k_d$
|
|
|
|
|
|
|
|
![Varying $k_d$](examples/kd-demo.png){width=240px}
|
|
|
|
|
|
|
|
## Varying $k_s$
|
|
|
|
|
|
|
|
![Varying $k_s$](examples/ks-demo.png){width=240px}
|
|
|
|
|
|
|
|
## Varying $n$
|
|
|
|
|
|
|
|
![Varying $n$](examples/n-demo.png){width=240px}
|
|
|
|
|
|
|
|
# Arbitrary Objects
|
|
|
|
|
|
|
|
![Varying $n$](examples/objects.png){width=240px}
|