{"id":16005202,"url":"https://github.com/64kramsystem/ray_tracer_challenge-completed","last_synced_at":"2025-08-14T05:15:14.190Z","repository":{"id":145877012,"uuid":"305451670","full_name":"64kramsystem/ray_tracer_challenge-completed","owner":"64kramsystem","description":"Implementation of the \"Ray Tracer Challenge\" in Rust, with additional parallelism","archived":false,"fork":false,"pushed_at":"2021-02-20T21:55:11.000Z","size":809,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-04T06:44:53.821Z","etag":null,"topics":["concurrent-programming","parallel-programming","pragprog","raytracing","rust","rust-lang"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/64kramsystem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-19T16:48:06.000Z","updated_at":"2022-04-17T17:37:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"b9601c5c-4a2d-45b5-ae34-7f7cd14ea960","html_url":"https://github.com/64kramsystem/ray_tracer_challenge-completed","commit_stats":{"total_commits":296,"total_committers":1,"mean_commits":296.0,"dds":0.0,"last_synced_commit":"afcd13e78c4f3c13e8ea21cd3998812d1108b713"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/64kramsystem/ray_tracer_challenge-completed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/64kramsystem%2Fray_tracer_challenge-completed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/64kramsystem%2Fray_tracer_challenge-completed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/64kramsystem%2Fray_tracer_challenge-completed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/64kramsystem%2Fray_tracer_challenge-completed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/64kramsystem","download_url":"https://codeload.github.com/64kramsystem/ray_tracer_challenge-completed/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/64kramsystem%2Fray_tracer_challenge-completed/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270364971,"owners_count":24571423,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-14T02:00:10.309Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["concurrent-programming","parallel-programming","pragprog","raytracing","rust","rust-lang"],"created_at":"2024-10-08T11:03:04.260Z","updated_at":"2025-08-14T05:15:14.146Z","avatar_url":"https://github.com/64kramsystem.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ray Tracer Challenge Completed project (in Rust)\n\nMy completed Ray Tracer Challenge project, written in Rust.\n\n## Overall design\n\nThe project has been written with the intention to produce good code, so the design is overall clean and simple.\n\nThe APIs (and test suites) are similar, but not equal to the book ones; at the beginning, I thought refactoring made sense, although later I realized that for comparison purposes, matching the book structure would have made comparisons easier.\n\nThe most significant difference is that this project's renderer is parallel, therefore, significantly faster than the book reference.\n\nTwo functions are unsafe; this has been necessary in order to make the objects tree mutex-free (which allows full parallelism); this unsafe problem has been discussed on the [Rust Programming Language Forum](https://users.rust-lang.org/t/is-it-possible-to-safely-build-a-read-only-thread-safe-bidirectional-tree/52759), and there is no trivial/safe solution.\n\nA change that would simplify the design is to convert the Shape trait into a base class; this is discussed on the trait comment. Also, it would be more readable just to have the owned version of the Matrix/Tuple operations, with a borrowed one for the exceptional cases.\n\nThe project is divided in `library`, `macros` and `practice`.\n\n## Demo renderings (from the last chapters)\n\n\u003cdetails\u003e\n  \u003csummary\u003eChapters 1-13: Shapes and properties\u003c/summary\u003e\n  \u003ca target=\"_blank\" rel=\"noopener noreferrer\" href=\"/assets/readme/chapter13_shapes_with_effects.png?raw=true\"\u003e\n    \u003cimg src=\"/assets/readme/chapter13_shapes_with_effects.png?raw=true\" width=\"800\" style=\"max-width:100%;\"\u003e\n  \u003c/a\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eChapter 14: Groups\u003c/summary\u003e\n  \u003ca target=\"_blank\" rel=\"noopener noreferrer\" href=\"/assets/readme/chapter14_hexagon.png?raw=true\"\u003e\n    \u003cimg src=\"/assets/readme/chapter14_hexagon.png?raw=true\" width=\"800\" style=\"max-width:100%;\"\u003e\n  \u003c/a\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eChapter 15: Triangles/WaveFront OBJ format\u003c/summary\u003e\n  \u003ca target=\"_blank\" rel=\"noopener noreferrer\" href=\"/assets/readme/chapter15_astronaut.png?raw=true\"\u003e\n    \u003cimg src=\"/assets/readme/chapter15_astronaut.png?raw=true\" width=\"800\" style=\"max-width:100%;\"\u003e\n  \u003c/a\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eChapter 16: CSG\u003c/summary\u003e\n  \u003ca target=\"_blank\" rel=\"noopener noreferrer\" href=\"/assets/readme/chapter16_csg.png?raw=true\"\u003e\n    \u003cimg src=\"/assets/readme/chapter16_csg.png?raw=true\" width=\"800\" style=\"max-width:100%;\"\u003e\n  \u003c/a\u003e\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F64kramsystem%2Fray_tracer_challenge-completed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F64kramsystem%2Fray_tracer_challenge-completed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F64kramsystem%2Fray_tracer_challenge-completed/lists"}