Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ray Tracing - Golang

First implementation of a simple Ray-Tracer in Golang. This implementation is heavily inspired by the excellent book by Jamis Buck, The Ray Tracer Challenge. It is a complete explanation of how a Ray Tracer work and can be implemented in any language of your choice.

Scene-_2

About the project

I wanted to learn a low level language for a while and decided this project would be the perfect opportunity. I first thought of using C++ when I discovered Go a low level language developed by Google with just 27 keywords. In retrospective I think using C++ or Rust would have been better options for this particular project.

Goals

  • Build a simple fully functional Ray-Tracer
  • Not use any external packages

Usage

  • Install Go
  • Clone repo to local repository
    • cd <directory>
    • git clone https://github.com/GerniVisser/Ray-Tracer.git
  • In main.go set the scene you want to render.

2 Default scenes pre-loaded

  • To render a custom scene create new go file in scene folder
    • follow conventions in scene1.go and scene2.go
    • In main.go set you new scene
  • To render new image run go run main.go

Features

Render and reshape Spheres and Planes

Reshape

Reflections and Shadows

Reflection-Demo

Refraction

Refraction

About

Simple implementation of a image generator using Ray Tracing to simulate actual rays of light to determine how the image should be rendered.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages