Skip to content

meshvaD/RayTracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RayTracer

How it works

  • we see colour because light (originating from a source) is reflected off of various subjects, before hitting our retina
  • when rendering 2D images, we can also think of it as rays originating from our eye (i.e. the observer), hitting various objects -- this is the idea of raytracing used here
  • images are created in ppm format (used an online converter to .jpg to display on this page)

Features

Shapes
  • can generate spheres, rectangular prisms, individual rectangular planes, and triangular planes

Textures
  • specify an image file, and the texture on here will be wrapped around each 3d object, as shown in the above image
Materials
  • can have objects with various shapes and textures with the materials : glass, metal, diffuse
  • can specify how diffuse the reflection will be for metal and diffuse objects, and can specify the index of refraction for glass

(diffuse on ground, metal on left and center, glass on right)
Position the camera
  • the camera will always point straight towards the screen, but its position can be adjusted

(same object positioning as above, but camera to the right + further back)
Lights
  • lights with different colours, intensities, and sizes can be added
  • each light will act like a point light, with intensity decreasing radially

(metal balls in colourful lighting 🎉)
Resolution and Dimensions
  • specify width/height ratio, and number of pixels in width -- a greater resolution will take longer

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published