<commit_before># Rayito

**Rayito** is a simple but educational ray tracer written in Go meant as a project to learn programming languages and optimization in Computer Graphics.

*"In computer graphics, ray tracing is a technique for generating an image by tracing the path of light through pixels in an image plane and simulating the effects of its encounters with virtual objects." - Wikipedia*

**Rayito** is meant to be simple, but implements a full set of features like:

+ Multi Threading
+ Oversampling (anti aliasing)
+ Ambient and Point Lights
+ Custom Materials
+ Specular and Difuse shading (Phong)
+ Reflection (mirror)
+ Refraction (transparency)
+ Soft Shadows
+ Scene description and parsing
+ PNG Export
+ and more...

Code is meant to be as clear as possible (no cutting names on variables) so it's meant to be read directly. In order to try **Rayito** either clone the git repository or do:

```
go get github.com/phrozen/rayito
```

After building the binary you can start to render by using some scenes in the *samples* directory or write your own.

### Usage
Set workers to the number of threads your CPU can handle (defaults to 4).
```
rayito -workers=8 -file=samples/test.txt
```

### Samples

![Helix](https://raw.githubusercontent.com/phrozen/rayito/master/samples/helix.txt.png)

![Spheres](https://raw.githubusercontent.com/phrozen/rayito/master/samples/test.txt.png)<commit_msg>fixed images routes in README<commit_after># Rayito

**Rayito** is a simple but educational ray tracer written in Go meant as a project to learn programming languages and optimization in Computer Graphics.

*"In computer graphics, ray tracing is a technique for generating an image by tracing the path of light through pixels in an image plane and simulating the effects of its encounters with virtual objects." - Wikipedia*

**Rayito** is meant to be simple, but implements a full set of features like:

+ Multi Threading
+ Oversampling (anti aliasing)
+ Ambient and Point Lights
+ Custom Materials
+ Specular and Difuse shading (Phong)
+ Reflection (mirror)
+ Refraction (transparency)
+ Soft Shadows
+ Scene description and parsing
+ PNG Export
+ and more...

Code is meant to be as clear as possible (no cutting names on variables) so it's meant to be read directly. In order to try **Rayito** either clone the git repository or do:

```
go get github.com/phrozen/rayito
```

After building the binary you can start to render by using some scenes in the *samples* directory or write your own.

### Usage
Set workers to the number of threads your CPU can handle (defaults to 4).
```
rayito -workers=8 -file=samples/test.txt
```

### Samples

![Helix](https://raw.githubusercontent.com/phrozen/rayito/master/samples/helix.png)

![Spheres](https://raw.githubusercontent.com/phrozen/rayito/master/samples/test.png)
{'fraction_non_alphanumeric': 0.08439716312056737, 'fraction_numerical': 0.0014184397163120568, 'mean_word_length': 4.630738522954092, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1234154', 'n_tokens_mistral': 802, 'n_tokens_neox': 762, 'n_words': 369}