Rusty Tracer Source: Github
I wanted to pick up a modern systems programming language and decided to learn Rust. I felt learning through a project would be the best
way to go about it. I had written a small ray tracer in Python first to learn the concepts of ray tracing and you see some renders from
that program below as well (denoted with Py).
Work on the rusty tracer is still ongoing. However, with school restarting and an on-going job search, time is a luxury.
The basic tracer is completed and I'm currently working on the web interface.
Rest assured, I do plan to finish this project. See you soon!
Scroll to the bottom to see how to access the backend.
Try it out!
This is a rough, no-frontend way to access to the backend:
You can attach a base64 represntation of an image to the material of the element (sphere / plane), have different types of light, transparency, etc. If you're interested, just let me know and I can explain the details.
API: https://rusty-tracing.herokuapp.com/trace
Send a POST request with the JSON as its body. You can mess around with the values to get a different picture.
JSON
{
"width": 800,
"height": 600,
"fov": 90.0,
"elements": [
{
"Sphere": {
"center": {
"x": 0.5,
"y": 0.6,
"z": -3.5
},
"radius": 1.5,
"material": {
"coloration": {
"Color" : {
"red": 0.2,
"green": 1.2,
"blue": 1.0
}
},
"albedo": 0.15,
"surface": {
"Reflective": {
"reflectivity": 0.3
}
}
}
}
}
],
"lights": [
{
"Spherical": {
"position": {
"x": -3.0,
"y": 5.0,
"z": -1.5
},
"intensity": 10000.0,
"color": {
"red": 1.0,
"green": 1.0,
"blue": 1.0
}
}
}
],
"shadow_bias": 0.000000001,
"max_recursion_depth": 5
}