rayito

Simple Ray Tracer written in Go.

  • Owner: phrozen/rayito
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

Rayito

Rayito is a simple but educational ray tracer written in Go meant as a project to learn programming languages and optimization in Computer Graphics.

"In computer graphics, ray tracing is a technique for generating an image by tracing the path of light through pixels in an image plane and simulating the effects of its encounters with virtual objects." - Wikipedia

Rayito is meant to be simple, but implements a full set of features like:

  • Multi Threading
  • Oversampling (anti aliasing)
  • Ambient and Point Lights
  • Custom Materials
  • Specular and Difuse shading (Phong)
  • Reflection (mirror)
  • Refraction (transparency)
  • Soft Shadows
  • Scene description and parsing
  • PNG Export
  • and more...

Code is meant to be as clear as possible (no cutting names on variables) so it's meant to be read directly. In order to try Rayito either clone the git repository or do:

go get github.com/phrozen/rayito

After building the binary you can start to render by using some scenes in the samples directory or write your own.

Usage

Set workers to the number of threads your CPU can handle (defaults to CPU Max Threads).

rayito -workers=8 -file="samples/scene.txt"

Samples

Helix

Spheres

Main metrics

Overview
Name With Ownerphrozen/rayito
Primary LanguageGo
Program languageGo (Language Count: 1)
Platform
License:MIT License
所有者活动
Created At2015-10-01 02:36:17
Pushed At2017-02-06 20:12:30
Last Commit At2017-02-06 14:04:30
Release Count0
用户参与
Stargazers Count117
Watchers Count6
Fork Count4
Commits Count8
Has Issues Enabled
Issues Count2
Issue Open Count1
Pull Requests Count0
Pull Requests Open Count0
Pull Requests Close Count0
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private