Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akbir/ray_tracer
Ray-tracer written in go
https://github.com/akbir/ray_tracer
golang graphics raytracer
Last synced: 5 days ago
JSON representation
Ray-tracer written in go
- Host: GitHub
- URL: https://github.com/akbir/ray_tracer
- Owner: akbir
- License: mit
- Created: 2020-04-27T22:02:45.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-05-01T20:08:03.000Z (over 4 years ago)
- Last Synced: 2023-03-09T08:36:06.878Z (over 1 year ago)
- Topics: golang, graphics, raytracer
- Language: Go
- Homepage:
- Size: 741 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ray Tracer
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
[![Go Report Card](https://goreportcard.com/badge/github.com/am-khan/ray_tracer)](https://goreportcard.com/report/github.com/am-khan/ray_tracer)A ray-tracer written in golang.
Roughly following the [Ray Tracing in One Weekend](https://markphelps.me/2016/03/15/writing-a-ray-tracer-in-go/) blog.
![Example Image](./assets/example_image.png)
## Install
To install, place the package in your `go/src` folder:
```shell script
~ go get github.com/am-khan/ray_tracer/cmd/ray_tracer
```## Usage
To run (with build):
```shell script
~ ray_tracerUsing 16 goroutines.
[================================================================================] 100.00%
Done.
Elapsed: 25.709205942s
```## Environment
Currently, the environment supports spheres, aliasing and 3 types of materials:* Lambertian
* Metallic
* DialectricTo set up a new object, go to `configs/config.json` and specify the properties there.
```shell script
go build github.com/am-khan/ray_tracer/cmd/ray_tracer
```## Outputs
Images are created at `./image.png` with the dimensions and attributes set within `configs/config.json`.## Testing
To run the unit tests - use the built-in go test runner:```shell script
~ go test ./...
```