Skip to content

akbir/ray_tracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ray Tracer

License: MIT Go Report Card

A ray-tracer written in golang.

Roughly following the Ray Tracing in One Weekend blog.

Example Image

Install

To install, place the package in your go/src folder:

~ go get github.com/am-khan/ray_tracer/cmd/ray_tracer

Usage

To run (with build):

~ ray_tracer

Using 16 goroutines.

[================================================================================] 100.00%

Done. 
Elapsed: 25.709205942s

Environment

Currently, the environment supports spheres, aliasing and 3 types of materials:

  • Lambertian
  • Metallic
  • Dialectric

To set up a new object, go to configs/config.json and specify the properties there.

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:

~ go test ./...

About

Ray-tracer written in go

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages