{"id":20989921,"url":"https://github.com/iddm/raytracerchallengeproblem","last_synced_at":"2025-07-08T16:37:02.600Z","repository":{"id":66200635,"uuid":"504072982","full_name":"iddm/raytracerchallengeproblem","owner":"iddm","description":null,"archived":false,"fork":false,"pushed_at":"2022-06-16T08:25:23.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-20T08:08:56.478Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iddm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-06-16T08:24:50.000Z","updated_at":"2022-06-16T08:25:27.000Z","dependencies_parsed_at":"2023-03-23T16:04:41.120Z","dependency_job_id":null,"html_url":"https://github.com/iddm/raytracerchallengeproblem","commit_stats":null,"previous_names":["iddm/raytracerchallengeproblem"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iddm%2Fraytracerchallengeproblem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iddm%2Fraytracerchallengeproblem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iddm%2Fraytracerchallengeproblem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iddm%2Fraytracerchallengeproblem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iddm","download_url":"https://codeload.github.com/iddm/raytracerchallengeproblem/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243401492,"owners_count":20285052,"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","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":[],"created_at":"2024-11-19T06:26:44.245Z","updated_at":"2025-03-13T11:46:06.353Z","avatar_url":"https://github.com/iddm.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The problem with walls in Ray Tracer Challenge\n\nHow I use the `rt.rs`:\n\n```rust\n    let world = crate::rt::test_world_2();\n    let mut camera = crate::camera!(100, 50, crate::degree!(60));\n    *camera.get_transform_matrix_mut() = crate::rt::view_transform(\n        crate::point!(0, 1.5, -5),\n        crate::point!(0, 1, 0),\n        crate::normalised_direction!(0, 1, 0),\n    );\n    camera.pixel_width = 500;\n    camera.pixel_height = 500;\n\n    let mut ppm = format!(\n        \"P3 {} {} 255\\n\",\n        camera.pixel_width, camera.pixel_height\n    );\n\n    let colors = self.camera.render(\u0026self.world);\n    colors.into_iter().flatten().for_each(|color| {\n        ppm.push_str(\u0026format!(\n            \"{} {} {} \",\n            (255.0 * color.r()) as u8,\n            (255.0 * color.g()) as u8,\n            (255.0 * color.b()) as u8\n        ));\n    });\n    std::fs::write(\"/tmp/rt.ppm\", ppm).expect(\"Couldn't write data\");\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiddm%2Fraytracerchallengeproblem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiddm%2Fraytracerchallengeproblem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiddm%2Fraytracerchallengeproblem/lists"}