miniRT
By Marcelo Magalhães and Ygor G. Sena, 2023.
Data Structures
Here are the data structures with brief descriptions:
 Cs_cameraThe structure of type t_camera contains the necessary information for camera configuration, rendering and transformation
 Cs_canvasThe struct of type t_canvas contains the necessary fields for graphic initialization and window rendering
 Cs_checkerThis structure encapsulates the function uv_checkers()
 Cs_colorThe struct s_color stores the color values of ray tracing. It contains a field for red, green and blue values. If all components are 1, the final color is white. Otherwise, if all of them are 0, the resulting color is black. Therefore, each field has a range between 0 and 1
 Cs_compsThis structure of type t_comps stores some precomputed values that are useful when working intersections and their color calculations
 Cs_coneThe structure t_cone represents a cone
 Cs_cylinderThe structure t_cylinder represents a cylinder
 Cs_discriminantThis struct stores the necessary data to evaluate a ray-sphere intersection. To do that, it relies in geometry, trigonometry and the Pythagorean theorem. It's important to mention that discriminant means the number that says whether the ray intersects the sphere at all. For a detailed description, refer to: https://www.scratchapixel.com/ lessons/3d-basic-rendering/minimal-ray-tracer-rendering-simple-shapes/ ray-sphere-intersection.html
 Cs_exposureThe struct s_exposure contains the necessary fields to calculate the a scene's lighting. Exposure is a technical term from photography that means exposition to light
 Cs_hitThe structure t_hit stores a linked list of ray-shape intersections' values
 Cs_lightThe struct s_light represents a light's source. This source has a position in space and an intensity color, i.e., red, purple etc
 Cs_materialA material has a surface color and four attributes from the Phong Reflection Model: ambient, diffuse, specular and shininess. Each one of these attributes accept a non negative floating point number. For ambient, diffuse and specular, the typical values are between 0 and 1. For shininess, values between 10 (very large highlight) and 200 (very small) highlight seem to work best, though there is no actual upper bound
 Cs_matrixThe struct t_matrix stores a matrix up to 4x4 and size of 16. A matrix is a grid of numbers that can be manipulated as a single unit. Matrices and their operations are the foundational basis which will helps us to manipulate points, vectors and, ultimately, shapes
 Cs_param
 Cs_patternThe type t_pattern contatins all the necessary information to apply a texture on a given shape's surface
 Cs_planeThe structure t_plane represents a plane
 Cs_rayThe struct of type t_ray represents a ray, which is the foundation for ray casting. Ray casting is the process of creating a ray, or line, and finding the intersections of that ray with the objects in a scene
 Cs_scannerRepresents a scanner
 Cs_sceneThe structure t_scene is how the user sees the ray tracing rendering. There is a camera from which the world of shapes and point lights are seen
 Cs_shape
 Cs_shearingThe struct t_shearing is a helper type to allow shearing operation on matrices. Shearing (or skew) is a complex operation where the coordinate is changed in proportion to the other two coordinates. When doing it to a matrix, it means that x will change in proportion to y and z, y will change in proportion to x and z and, lastly, z will change in proportion to x and y. For example, to apply shearing to the x axis of a given matrix, we pass to shearing() a struct of type t_shearing containing the y and z values. For instance, when done to the y axis, we pass p1 and p2 which stands for x and z. Lastly, when applying it to the z axis, we pass x and y as p1 and p2, respectively
 Cs_sightThe struct s_sight represents the human eye looking forwards
 Cs_sphereThe structure t_sphere represents a sphere
 Cs_text_mapThis structure creates a t_pattern subclass (the same as t_pttr_at, which calls stripe_at() or checkered_at()). t_text_map is a subclass that uses spherical_map(), planar_map() or cylindrical_map() to define how to apply a pattern on a given 2D or 3D shape's surface
 Cs_tupleTuple means a list of ordered things. The struct t_tuple stores coordinates for a left-handed coordinate system, i.e, the thumb of your left hand points to x in the right direction, the fingers point to y and curling the fingers towards the palm point to z
 Cs_uv_imageThe struct of type t_uv_image represents an image used for texturing another image
 Cs_worldThis struct contains everything related to the building of a ray tracing's world. The world has objects (or shapes), point lights and an ambient color. Together, these elements makes the scene rendering possible
 Ct_shapeRepresents a shape in a scene