t_pattern new_pattern(t_color a, t_color b)
This function creates a new default pattern with the following properties: it has a stripe pattern an...
Definition: patterns.c:16
t_checker uv_checkers(double width, double height, t_color a, t_color b)
This function creates a checker structure to be used by pattern functions.
Definition: checkers.c:15
struct s_pattern t_pattern
The type t_pattern contatins all the necessary information to apply a texture on a given shape's surf...
Definition: patterns.h:19
t_color checkered_at(t_pattern pattern, t_point world_point)
This function applies a checkered pattern on shape's surface located at a given world point....
Definition: patterns.c:39
struct s_uv_image t_uv_image
The struct of type t_uv_image represents an image used for texturing another image.
struct s_checker t_checker
This structure encapsulates the function uv_checkers().
Definition: patterns.h:20
struct s_text_map t_text_map
This structure creates a t_pattern subclass (the same as t_pttr_at, which calls stripe_at() or checke...
t_checker spherical_map(t_point point)
This function renders a 3D point of a sphere on its surface to a 2D point (u, v) on the flattered sur...
Definition: mappings.c:21
t_color stripe_at(t_pattern pattern, t_point world_point)
This function applies a stripe pattern on shape's surface located at a given world point....
Definition: patterns.c:32
t_color(* t_pttr_at)(t_pattern pattern, t_point world_point)
t_pttr_at is a function-type that receives the function's name of a pattern to be applied....
Definition: patterns.h:29
t_checker planar_map(t_point point)
This function renders a 3D point of a plane on its surface to a 2D point (u, v) on the flattered surf...
Definition: mappings.c:42
t_checker cylindrical_map(t_point point)
This function renders a 3D point of a cylinder on its surface to a 2D point (u, v) on the flattered s...
Definition: mappings.c:57
void texture_map(t_pattern *pattern, t_checker checkers, t_uv_map uv_map)
This function saves t_checker struct to t_pattern struct. It sends information to t_pattern about how...
Definition: mappings.c:15
void set_pattern_transform(t_pattern *pattern, t_matrix transform)
This function assigns a transformation matrix to a pattern, which is used to manipulate the way the p...
Definition: patterns.c:62
t_color uv_pattern_at(t_checker checkers, double u, double v)
This function gets the pattern's color and at the given width (v) and height (v) coordinates stored a...
Definition: checkers.c:25
t_color bumped_at(t_pattern pattern, t_point point)
Calculates the color of a bumped pattern applied to a shape's surface at a given point.
Definition: bumpmap.c:19
t_ray transform(t_ray ray, t_matrix matrix)
The function transform() multiplies a given ray by a given matrix, which results in an unnormalized r...
Definition: rays.c:27
This structure encapsulates the function uv_checkers().
Definition: patterns.h:44
The struct s_color stores the color values of ray tracing. It contains a field for red,...
Definition: tuples.h:63
The struct t_matrix stores a matrix up to 4x4 and size of 16. A matrix is a grid of numbers that can ...
Definition: matrices.h:34
The type t_pattern contatins all the necessary information to apply a texture on a given shape's surf...
Definition: patterns.h:123
This structure creates a t_pattern subclass (the same as t_pttr_at, which calls stripe_at() or checke...
Definition: patterns.h:99
Tuple means a list of ordered things. The struct t_tuple stores coordinates for a left-handed coordin...
Definition: tuples.h:33
The struct of type t_uv_image represents an image used for texturing another image.
Definition: patterns.h:72
struct s_color t_color
The struct s_color stores the color values of ray tracing. It contains a field for red,...
t_tuple point(double x, double y, double z)
This function is a simplification of the function tuple(). It will create a point with the given coor...
Definition: models.c:20