Skip to content

Mathematician2000/raytracer-task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Raytracer implementation in Python

Task details

Your task is to implement your own raytracer in Python following the guides in this template project.

You need to fill in the gaps in the following files:

  • geometry:
    • vector.py: all basic operations on Vector instances
    • ray.py: reflection and refraction of rays
    • sphere.py: quadratic equations, normals to the sphers surface, and ray-sphere intersection
    • triangle.py: triangle area, Moller-Trumbore algorithm of ray-triangle intersection, and barycentric coordinates
  • render:
    • matrix.py: camera-to-world projection matrix
    • scene.py: raytracer implementation, namely:
      • find_closest_intersection: find intersection of a ray with the first object in the scene
      • is_point_illuminated: check if a point is illuminated by a point light source
      • get_intensity: calculate total light intensity at the given point
      • trace_ray: trace a ray recursively over the scene, reflecting and refracting it when necessary
      • tone_mapping: implement tone mapping postprocessing algorithm in-place
      • gamma_correction: implement gamma correction postprocessing algorithm in-place

Don't forget to run pytest tests in geometry and render folders to check your implementation!

Sources:

Good luck!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages