Skip to content

Latest commit

 

History

History
72 lines (51 loc) · 2.1 KB

README.md

File metadata and controls

72 lines (51 loc) · 2.1 KB

Ray Tracing in Go

cover image

A Go implementation of the book Ray Tracing in One Weekend. The repository provides a library to describe and render your own scenes. For more detail, see examples/main.go.

Getting Started

git clone [email protected]:y-taka-23/raytracing-go.git
cd raytracing-go
make examples
./bin/example > example.ppm
open example.ppm

Materials

Lambertian

color result
(0.8, 0.1, 0.1) red lambertian sphere
(1.0, 1.0, 1.0) white lambertian sphere
(0.0, 0.0, 0.0) black lambertian sphere

Metalic

fuzziness result
0.0 metalic sphere of fuzziness 0.0
0.15 metalic sphere of fuzziness 0.15
0.3 metalic sphere of fuzziness 0.3

Dielectric

refractive index result
1.0 dielectric sphere of refractive index 1.0
1.5 dielectric sphere of refractive index 1.5
2.0 dielectric sphere of refractive index 2.0

Camera Setting

Angle of View

virtical angle (degree) result
90 result of the vertical angle in 90 degree
60 result of the vertical angle in 60 degree
30 result of the vertical angle in 30 degree

Aperture

aperture result
0.0 result of the aperture 0.0
0.5 result of the aperture 0.5
1.0 result of the aperture 1.0

Depth of Field

focus distance result
6 result of the depth of field 6
9 result of the depth of field 9
12 result of the depth of field 12

Reference