ray_tracer

module
v0.0.0-...-5eff40d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2020 License: MIT

README

Ray Tracer

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 ./...

Directories

Path Synopsis
cmd
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL