Skip to content

Commit a116038

Browse files
authored
Update README.md
changed hyperlinks from 'alx-sch' to 'Busedame'
1 parent e58cb24 commit a116038

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

README.md

+36-36
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# miniRT
22

33
<p align="center">
4-
<img src="https://github.com/alx-sch/42_miniRT/blob/main/.assets/minirt_badge.png" alt="minirt_badge.png" />
4+
<img src="https://github.com/Busedame/miniRT/blob/main/.assets/minirt_badge.png" alt="minirt_badge.png" />
55
</p>
66

77
<p align="center">
8-
<img src="https://raw.githubusercontent.com/alx-sch/42_miniRT/refs/heads/main/.assets/miniRT_render.png" alt="miniRT_render.png" width="500"/>
8+
<img src="https://raw.githubusercontent.com/Busedame/miniRT/refs/heads/main/.assets/miniRT_render.png" alt="miniRT_render.png" width="500"/>
99
<br>
10-
<span>miniRT render of <a href="https://github.com/alx-sch/42_miniRT/blob/main/scenes/cam_inside_sphere.rt">this scene</a>.</span>
10+
<span>miniRT render of <a href="https://github.com/Busedame/miniRT/blob/main/scenes/cam_inside_sphere.rt">this scene</a>.</span>
1111
</p>
1212

1313
This project is a collaboration between:
@@ -43,7 +43,7 @@ This project is a collaboration between:
4343

4444
1. Clone the repository and navigate into the project directory:
4545
```
46-
git clone https://github.com/alx-sch/miniRT miniRT && cd miniRT
46+
git clone https://github.com/Busedame/miniRT miniRT && cd miniRT
4747
```
4848

4949
2. Build the project:
@@ -83,20 +83,20 @@ The `.rt` files define the elements and configurations for the scene to be rende
8383
#### Mandatory Elements
8484

8585
- **Ambient Light**
86-
<img src="https://github.com/alx-sch/42_miniRT/blob/main/.assets/rt_A.png" width="500" />
86+
<img src="https://github.com/Busedame/miniRT/blob/main/.assets/rt_A.png" width="500" />
8787
* **Identifier**: `A`
8888
* **Ambient lighting ratio** (brightness) [0.0, 1.0]: `0.2`
8989
* **Color** in RGB [0, 255]: `255, 255, 255`
9090

9191
- **Camera**
92-
<img src="https://github.com/alx-sch/42_miniRT/blob/main/.assets/rt_C.png" width="500"/>
92+
<img src="https://github.com/Busedame/miniRT/blob/main/.assets/rt_C.png" width="500"/>
9393
* **Identifier**: `C`
9494
* **Position (XYZ coordinates)**: `-50.0, 0, 20`
9595
* **Normalized orientation vector**: `0, 0, 1`
9696
* **Field of view (FOV)** in degrees [0, 180]: `70`
9797

9898
- **Light**
99-
<img src="https://github.com/alx-sch/42_miniRT/blob/main/.assets/rt_L.png" width="500"/>
99+
<img src="https://github.com/Busedame/miniRT/blob/main/.assets/rt_L.png" width="500"/>
100100
* **Identifier**: `L`
101101
* **Position (XYZ coordinates)**: `-40.0, 50.0, 0.0`
102102
* **Lighting ratio** (brightness) [0.0, 1.0]: `0.6`
@@ -105,21 +105,21 @@ The `.rt` files define the elements and configurations for the scene to be rende
105105
#### Optional Elements
106106

107107
- **Plane**
108-
<img src="https://github.com/alx-sch/42_miniRT/blob/main/.assets/rt_pl.png" width="500"/>
108+
<img src="https://github.com/Busedame/miniRT/blob/main/.assets/rt_pl.png" width="500"/>
109109
* **Identifier**: `pl`
110110
* **Position (XYZ coordinates)** of a point on the plane: `0.0, 0.0, -10.0`
111111
* **Normalized orientation vector**: `0.0, 1.0, 0.0`
112112
* **Color** in RGB [0, 255]: `0, 0, 225`
113113

114114
- **Sphere**
115-
<img src="https://github.com/alx-sch/42_miniRT/blob/main/.assets/rt_sp.png" width="500"/>
115+
<img src="https://github.com/Busedame/miniRT/blob/main/.assets/rt_sp.png" width="500"/>
116116
* **Identifier**: `sp`
117117
* **Position (XYZ coordinates)** of the center: `0.0, 0.0, 20.6`
118118
* **Diameter**: `12.6`
119119
* **Color** in RGB [0, 255]: `10, 0, 255`
120120

121121
- **Cylinder**
122-
<img src="https://github.com/alx-sch/42_miniRT/blob/main/.assets/rt_cy.png" width="500"/>
122+
<img src="https://github.com/Busedame/miniRT/blob/main/.assets/rt_cy.png" width="500"/>
123123
* **Identifier**: `cy`
124124
* **Position (XYZ coordinates)** of the center: `50.0, 0.0, 20.6`
125125
* **Normalized orientation vector** (axis): `0.0, 0.0, 1.0`
@@ -143,7 +143,7 @@ This method was popular in early static computer graphics —think of those icon
143143
This project, **miniRT**, aims to build a simple yet functional ray tracer from scratch in C, exploring the fundamentals of vector calculations and rendering.
144144

145145
<p align="center">
146-
<img src="https://github.com/alx-sch/42_miniRT/blob/main/.assets/ray_tracing_process.png" alt="ray_tracing_process.png" width="400"/>
146+
<img src="https://github.com/Busedame/miniRT/blob/main/.assets/ray_tracing_process.png" alt="ray_tracing_process.png" width="400"/>
147147
<br>
148148
<span><strong>Ray-tracing process:</strong> The ray goes from the camera through a pixel of the window and is tested for intersection with the objects. When a ray hits an object, the ray tracer works out how much light is reflected back along the ray to determine the pixel's color.<sup><a href="#footnote1">[1]</a></sup></span>
149149
</p>
@@ -195,7 +195,7 @@ Where:
195195
- **$\vec{n} $:** The normal vector of the plane, which is perpendicular to the surface.
196196

197197
<p align="center">
198-
<img src="https://github.com/alx-sch/42_miniRT/blob/main/.assets/plane_definition.png" alt="plane_definition.png" width="200"/>
198+
<img src="https://github.com/Busedame/miniRT/blob/main/.assets/plane_definition.png" alt="plane_definition.png" width="200"/>
199199
<br>
200200
<span>A plane is defined by a point <i>a</i>, which determines its location, and a normal <i>n</i>, which defines its orientation. The point <i>p</i> is any point on the plane, such as the intersection of a ray with the plane.<sup><a href="#footnote1">[1]</a></sup></span>
201201
</p>
@@ -223,7 +223,7 @@ $$
223223
- If the denominator $(\vec{d} \cdot \vec{n} )$ is zero (*t* is undefined or infinite), it means the ray is **parallel** to the plane and does not intersect it.
224224

225225
<p align="center">
226-
<img src="https://github.com/alx-sch/42_miniRT/blob/main/.assets/ray_plane_intersection.png" alt="ray_plane_intersection.png" width="400"/>
226+
<img src="https://github.com/Busedame/miniRT/blob/main/.assets/ray_plane_intersection.png" alt="ray_plane_intersection.png" width="400"/>
227227
<br>
228228
<span>The plane becomes visible if the ray intersects it in front of the camera's origin (t > 0).<sup><a href="#footnote1">[1]</a></sup></span>
229229
</p>
@@ -403,7 +403,7 @@ Where:
403403
- **$r$:** The radius of the sphere.
404404

405405
<p align="center">
406-
<img src="https://github.com/alx-sch/42_miniRT/blob/main/.assets/sphere_definition.png" alt="sphere_definition.png" width="200"/>
406+
<img src="https://github.com/Busedame/miniRT/blob/main/.assets/sphere_definition.png" alt="sphere_definition.png" width="200"/>
407407
<br>
408408
<span> A sphere is defined by its center <i>c</i> and radius <i>r</i>, which determine its size and position. The point <i>p</i> represents any point on the sphere's surface (potential intersection point).<sup><a href="#footnote1">[1]</a></sup></span>
409409
</p>
@@ -432,7 +432,7 @@ $$
432432
t^2 + 2t \left( \vec{oc} \cdot \vec{d} \right) + \left( \vec{oc} \cdot \vec{oc} \right) - r^2 = 0
433433
$$
434434

435-
As explained [above](https://github.com/alx-sch/42_miniRT/blob/main/README.md#quadratic-intersections-in-ray-tracing), this solves into:
435+
As explained [above](https://github.com/Busedame/miniRT/blob/main/README.md#quadratic-intersections-in-ray-tracing), this solves into:
436436

437437
$$
438438
t = \frac{-b \pm \sqrt{b^2 - 4c}}{2}
@@ -445,13 +445,13 @@ Where the coefficients are:
445445
- **$c = (\vec{oc} \cdot \vec{oc}) - r^2$**
446446

447447
<p align="center">
448-
<img src="https://github.com/alx-sch/42_miniRT/blob/main/.assets/ray_sphere_discriminante.png" alt="ray_sphere_discriminante.png" width="400"/>
448+
<img src="https://github.com/Busedame/miniRT/blob/main/.assets/ray_sphere_discriminante.png" alt="ray_sphere_discriminante.png" width="400"/>
449449
<br>
450450
<span>The discriminant indicates whether the ray intersects the sphere at zero, one, or two points.<sup><a href="#footnote1">[1]</a></sup></span>
451451
</p>
452452

453453
<p align="center">
454-
<img src="https://github.com/alx-sch/42_miniRT/blob/main/.assets/ray_sphere_intersection_distance.png" alt="ray_sphere_intersection_distance.png" width="400"/>
454+
<img src="https://github.com/Busedame/miniRT/blob/main/.assets/ray_sphere_intersection_distance.png" alt="ray_sphere_intersection_distance.png" width="400"/>
455455
<br>
456456
<span>Rays do not register an intersection at their origin; the intersection requires t > 0.<sup><a href="#footnote1">[1]</a></sup></span>
457457
</p>
@@ -533,7 +533,7 @@ $$
533533
$$
534534
535535
<p align="center">
536-
<img src="https://github.com/alx-sch/42_miniRT/blob/main/.assets/cylinder_definition.png" alt="cylinder_definition.png" width="200"/>
536+
<img src="https://github.com/Busedame/miniRT/blob/main/.assets/cylinder_definition.png" alt="cylinder_definition.png" width="200"/>
537537
<br>
538538
<span>A cylinder is defined by a point on its axis and a vector representing its direction (e.g., <i>(0,0,0)</i> as the point and <i>(0,1,0)</i> as the orientation vector along the y-axis in the figure above), a radius, and a height given by $\Vert y_1 - y_0 \Vert$. The point <i>p</i> can be any point on the cylinder's surface.<sup><a href="#footnote1">[1]</a></sup></span>
539539
</p>
@@ -554,7 +554,7 @@ $$
554554
\Vert \vec{p} \Vert^2 - (\vec{p} \cdot \vec{u})^2 = r^2
555555
$$
556556
557-
The parametric form of the [ray equation](https://github.com/alx-sch/42_miniRT/blob/main/README.md#ray-equation) is:
557+
The parametric form of the [ray equation](https://github.com/Busedame/miniRT/blob/main/README.md#ray-equation) is:
558558
559559
$$
560560
P_x(t) = O_x + tD_x
@@ -666,7 +666,7 @@ int ray_intersect_cylinder(t_vec3 ray_origin, t_vec3 ray_dir, t_cylinder *cylind
666666
Please note that this function calculates the intersection of a ray with an infinite cylinder, not yet considering the cylinder's height and end caps. So far, it only detects intersections with the cylinder's lateral surface:
667667

668668
<p align="center">
669-
<img src="https://github.com/alx-sch/42_miniRT/blob/main/.assets/scene_no_height.png" alt="scene_no_height.png" width="500"/>
669+
<img src="https://github.com/Busedame/miniRT/blob/main/.assets/scene_no_height.png" alt="scene_no_height.png" width="500"/>
670670
<br>
671671
<span>The blue and red objects are both infinite cylinders.</span>
672672
</p>
@@ -705,7 +705,7 @@ $$
705705
$$
706706

707707
<p align="center">
708-
<img src="https://github.com/alx-sch/42_miniRT/blob/main/.assets/ray_cyl_height.png" alt="ray_cyl_height.png" width="350"/>
708+
<img src="https://github.com/Busedame/miniRT/blob/main/.assets/ray_cyl_height.png" alt="ray_cyl_height.png" width="350"/>
709709
</p>
710710

711711
```C
@@ -767,7 +767,7 @@ int ray_intersect_cylinder(t_vec3 ray_origin, t_vec3 ray_dir, t_cylinder *cylind
767767
}
768768
```
769769
<p align="center">
770-
<img src="https://github.com/alx-sch/42_miniRT/blob/main/.assets/scene_no_caps.png" alt="scene_no_caps.png" width="500"/>
770+
<img src="https://github.com/Busedame/miniRT/blob/main/.assets/scene_no_caps.png" alt="scene_no_caps.png" width="500"/>
771771
<br>
772772
<span>The blue and red cylinders are finite in height but have no caps. Looking through the blue cylinder.</span>
773773
</p>
@@ -877,7 +877,7 @@ int ray_intersect_cap(t_vec3 ray_origin, t_vec3 ray_dir, t_cylinder *cyl, double
877877
```
878878

879879
<p align="center">
880-
<img src="https://github.com/alx-sch/42_miniRT/blob/main/.assets/scene_complete_cyl.png" alt="scene_complete_cyl.png" width="500"/>
880+
<img src="https://github.com/Busedame/miniRT/blob/main/.assets/scene_complete_cyl.png" alt="scene_complete_cyl.png" width="500"/>
881881
<br>
882882
<span>Looking at the end cap of the closed blue cylinder.</span>
883883
</p>
@@ -933,7 +933,7 @@ void find_intersection(t_vec3 ray_ori, t_vec3 ray_dir, t_rt *rt, t_ix *ix)
933933
}
934934
```
935935
936-
For each object, the appropriate intersection function (`plane_ix`, `sphere_ix`, `cyl_ix`, see in [find_intersection.c](https://github.com/alx-sch/42_miniRT/blob/main/src/4_find_intersection.c])) is called based on the object's type. These functions check if the ray intersects the object and update the intersection data (`ix`) if the intersection is the closest one found so far.
936+
For each object, the appropriate intersection function (`plane_ix`, `sphere_ix`, `cyl_ix`, see in [find_intersection.c](https://github.com/Busedame/miniRT/blob/main/src/4_find_intersection.c)) is called based on the object's type. These functions check if the ray intersects the object and update the intersection data (`ix`) if the intersection is the closest one found so far.
937937
938938
While the origins of the camera rays are known, the following chapter will explain how to calculate the direction of each camera ray.
939939
@@ -950,7 +950,7 @@ Following the camera ray (or primary ray) for a given pixel is the first step in
950950
### Perspective Viewing
951951
952952
<p align="center">
953-
<img src="https://github.com/alx-sch/42_miniRT/blob/main/.assets/orthographic_perspective_viewing.png" alt="orthographic_perspective_viewing.png" width="500"/>
953+
<img src="https://github.com/Busedame/miniRT/blob/main/.assets/orthographic_perspective_viewing.png" alt="orthographic_perspective_viewing.png" width="500"/>
954954
<br>
955955
<span><strong>Top:</strong> In orthogonal viewing, each pixel is a separate camera ray, all running parallel to one another. This results in objects being the same size, regardless of their distance. Used in technical drawings and CAD. <br><strong>Bottom:</strong> Perspective viewing is more in line with how we perceive the world: Camera rays have a single point of origin. This way, objects have a vanishing point and appear smaller the farther they are away. Used in realistic 3D rendering. <br> Sources: Diagrams left <sup><a href="#footnote1">[1]</a></sup>; diagrams right<sup><a href="#footnote2">[2]</a></sup> </span>
956956
</p>
@@ -965,13 +965,13 @@ A **pinhole camera model** can be used to describe how a 3D scene is projected o
965965
- The **view frustum** is a truncated pyramid extending from the camera's position toward the viewport. The rectangular screen at the base of the frustum defines the visible scene.
966966
967967
<p align="center">
968-
<img width="600" alt="FOV_frustum" src="https://github.com/alx-sch/miniRT/blob/main/.assets/FOV_frustum.png">
968+
<img width="600" alt="FOV_frustum" src="https://github.com/Busedame/miniRT/blob/main/.assets/FOV_frustum.png">
969969
<br>
970970
<span>Pinhole camera model illustrating the FOV frustum and the rectangular screen for 2D projection (viewport).</span>
971971
</p>
972972
973973
<p align="center">
974-
<img width="350" alt="Viewpoint_FOV" src="https://github.com/alx-sch/miniRT/blob/main/.assets/Viewport_Field_of_View.png">
974+
<img width="350" alt="Viewpoint_FOV" src="https://github.com/Busedame/miniRT/blob/main/.assets/Viewport_Field_of_View.png">
975975
<br>
976976
<span>Top: Camera's FOV viewed from above. Bottom: 2D projection onto the screen.</span>
977977
</p>
@@ -1007,7 +1007,7 @@ $$
10071007
$$
10081008
10091009
<p align="center">
1010-
<img width="350" alt="tan_FOV" src="https://github.com/alx-sch/miniRT/blob/main/.assets/tan_FOV.png">
1010+
<img width="350" alt="tan_FOV" src="https://github.com/Busedame/miniRT/blob/main/.assets/tan_FOV.png">
10111011
<p align="center"> </p>
10121012
10131013
@@ -1254,10 +1254,10 @@ t_shdw compute_shadow_ray(t_ix *camera_ray_ix, t_light light)
12541254
If the origin of the shadow ray (the intersection between the camera ray and the object) is not moved slightly above the surface, an effect called "shadow acne" can be observed. Because computers cannot represent floating-point numbers with perfect precision, the hit point falls within a small margin of error around the surface. This means that some calculated hit points end up slightly below the surface. As a result, the shadow ray incorrectly intersects the object itself, causing it to cast a shadow on its own intersection point.
12551255

12561256
<p align="center">
1257-
<img src="https://raw.githubusercontent.com/alx-sch/42_miniRT/refs/heads/main/.assets/shadow_0.png" alt="shadow_0.png" width="400"/> <br> (a) <br>
1258-
<img src="https://raw.githubusercontent.com/alx-sch/42_miniRT/refs/heads/main/.assets/shadow_1.png" alt="shadow_1.png" width="400"/> <br> (b) <br>
1259-
<img src="https://raw.githubusercontent.com/alx-sch/42_miniRT/refs/heads/main/.assets/shadow_2.png" alt="shadow_2.png" width="400"/> <br> (c) <br>
1260-
<img src="https://raw.githubusercontent.com/alx-sch/42_miniRT/refs/heads/main/.assets/shadow_3.png" alt="shadow_3.png" width="400"/> <br> (d) <br>
1257+
<img src="https://raw.githubusercontent.com/Busedame/miniRT/refs/heads/main/.assets/shadow_0.png" alt="shadow_0.png" width="400"/> <br> (a) <br>
1258+
<img src="https://raw.githubusercontent.com/Busedame/miniRT/refs/heads/main/.assets/shadow_1.png" alt="shadow_1.png" width="400"/> <br> (b) <br>
1259+
<img src="https://raw.githubusercontent.com/Busedame/miniRT/refs/heads/main/.assets/shadow_2.png" alt="shadow_2.png" width="400"/> <br> (c) <br>
1260+
<img src="https://raw.githubusercontent.com/Busedame/miniRT/refs/heads/main/.assets/shadow_3.png" alt="shadow_3.png" width="400"/> <br> (d) <br>
12611261
<span>The same scene without any shadowing <strong>(a)</strong>; shadowing without ensuring that the shadow ray-object intersection occurs in front of the light source <strong>(b)</strong>; shadowing without offsetting the shadow ray origin, resulting in shadow acne <strong>(c)</strong>, correct shadowing <strong>(d)</strong>. Note that no shading has been applied yet and shadows are still rendered as black.</span>
12621262
</p>
12631263

@@ -1284,7 +1284,7 @@ To improve this, we can use the Phong Reflection Model, which simulates how ligh
12841284
<br>
12851285

12861286
<p align="center">
1287-
<img src="https://github.com/alx-sch/42_miniRT/blob/main/.assets/Phong_reflection_model.png" alt="phong_reflection_model.png" width="600"/>
1287+
<img src="https://github.com/Busedame/miniRT/blob/main/.assets/Phong_reflection_model.png" alt="phong_reflection_model.png" width="600"/>
12881288
<br>
12891289
<span><strong>Phong Reflection Model</strong>: Ambient Lighting + Diffuse Shading + Specular Reflection = Complete Shading Model.<sup><a href="#footnote3">[3]</a></sup></span>
12901290
</p>
@@ -1426,9 +1426,9 @@ t_shade get_shading(t_rt *rt, t_ix *ix)
14261426
```
14271427
14281428
<p align="center">
1429-
<img src="https://raw.githubusercontent.com/alx-sch/42_miniRT/refs/heads/main/.assets/diffuse_shading.png" alt="diffuse_shading.png" width="400"/> <br> (a) <br>
1430-
<img src="https://raw.githubusercontent.com/alx-sch/42_miniRT/refs/heads/main/.assets/spec_no_fading.png" alt="spec_no_fading.png" width="400"/> <br> (b) <br>
1431-
<img src="https://raw.githubusercontent.com/alx-sch/42_miniRT/refs/heads/main/.assets/spec_fading.png" alt="spec_fading.png" width="400"/> <br> (c) <br>
1429+
<img src="https://raw.githubusercontent.com/Busedame/miniRT/refs/heads/main/.assets/diffuse_shading.png" alt="diffuse_shading.png" width="400"/> <br> (a) <br>
1430+
<img src="https://raw.githubusercontent.com/Busedame/miniRT/refs/heads/main/.assets/spec_no_fading.png" alt="spec_no_fading.png" width="400"/> <br> (b) <br>
1431+
<img src="https://raw.githubusercontent.com/Busedame/miniRT/refs/heads/main/.assets/spec_fading.png" alt="spec_fading.png" width="400"/> <br> (c) <br>
14321432
<span>The same scene with: ambient light and diffuse shading <strong>(a)</strong>, specular highlighting <strong>(b)</strong>, and light fading <strong>(c)</strong>, resulting in a fully shaded render.</span>
14331433
</p>
14341434

0 commit comments

Comments
 (0)