https://github.com/y-taka-23/raytracing-go
A simple Go library for 3D ray-tracing rendering, implementing the book Ray Tracing in One Weekend. 📸
https://github.com/y-taka-23/raytracing-go
3d-graphics computer-graphics go golang raytracing
Last synced: about 1 year ago
JSON representation
A simple Go library for 3D ray-tracing rendering, implementing the book Ray Tracing in One Weekend. 📸
- Host: GitHub
- URL: https://github.com/y-taka-23/raytracing-go
- Owner: y-taka-23
- License: apache-2.0
- Created: 2021-03-14T21:02:11.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-03T12:39:42.000Z (about 5 years ago)
- Last Synced: 2025-06-08T11:08:00.001Z (about 1 year ago)
- Topics: 3d-graphics, computer-graphics, go, golang, raytracing
- Language: Go
- Homepage:
- Size: 2.95 MB
- Stars: 54
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ray Tracing in Go

A Go implementation of the book [Ray Tracing in One Weekend](https://raytracing.github.io/). The repository provides a library to describe and render your own scenes. For more detail, see [`examples/main.go`](examples/main.go).
## Getting Started
```shell
git clone git@github.com: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)||
|(1.0, 1.0, 1.0)||
|(0.0, 0.0, 0.0)||
### Metalic
|fuzziness|result|
|:----:|:----:|
|0.0||
|0.15||
|0.3||
### Dielectric
|refractive index|result|
|:----:|:----:|
|1.0||
|1.5||
|2.0||
## Camera Setting
### Angle of View
|virtical angle (degree)|result|
|:----:|:----:|
|90||
|60||
|30||
### Aperture
|aperture|result|
|:----:|:----:|
|0.0||
|0.5||
|1.0||
### Depth of Field
|focus distance|result|
|:----:|:----:|
|6||
|9||
|12||
## Reference
* Shirley, P. (2016). _Ray Tracing in One Weekend_ ([online edition available](https://raytracing.github.io/))