Raytracer implementation in Python
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 instancesray.py: reflection and refraction of rayssphere.py: quadratic equations, normals to the sphers surface, and ray-sphere intersectiontriangle.py: triangle area, Moller-Trumbore algorithm of ray-triangle intersection, and barycentric coordinates
render:matrix.py: camera-to-world projection matrixscene.py: raytracer implementation, namely:find_closest_intersection: find intersection of a ray with the first object in the sceneis_point_illuminated: check if a point is illuminated by a point light sourceget_intensity: calculate total light intensity at the given pointtrace_ray: trace a ray recursively over the scene, reflecting and refracting it when necessarytone_mapping: implement tone mapping postprocessing algorithm in-placegamma_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!