{"id":16499196,"url":"https://github.com/hardbyte/rustyscene","last_synced_at":"2026-05-14T02:36:28.441Z","repository":{"id":202962318,"uuid":"708305215","full_name":"hardbyte/rustyscene","owner":"hardbyte","description":"A toy ray tracer in rust","archived":false,"fork":false,"pushed_at":"2023-10-28T07:06:58.000Z","size":917,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-12T05:07:23.878Z","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/hardbyte.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-22T06:34:12.000Z","updated_at":"2023-10-22T06:44:31.000Z","dependencies_parsed_at":"2023-10-28T08:20:42.316Z","dependency_job_id":null,"html_url":"https://github.com/hardbyte/rustyscene","commit_stats":null,"previous_names":["hardbyte/rustyscene"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hardbyte/rustyscene","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardbyte%2Frustyscene","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardbyte%2Frustyscene/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardbyte%2Frustyscene/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardbyte%2Frustyscene/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hardbyte","download_url":"https://codeload.github.com/hardbyte/rustyscene/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardbyte%2Frustyscene/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33008336,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"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":[],"created_at":"2024-10-11T14:51:30.316Z","updated_at":"2026-05-14T02:36:28.398Z","avatar_url":"https://github.com/hardbyte.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rustyscene\n\nA toy brute force path tracer written in Rust following the tutorial [Ray Tracing in one weekend](https://raytracing.github.io/).\n\nFeatures two basic primitive shapes:\n- `Sphere`\n- `Triangle`\n\nalong with three different material types:\n- `Diffuse`\n- `Metallic`\n- `Dielectric`\n\n\n## Example \n\n```rust\nfn main() {\n\n    let width = 1280;\n    let height = 720;\n    let options = RenderOptions { samples: 1000, max_bounces: 100 };\n\n    let camera = Camera::new(\n\n        Vector::new(-0.5, 0.0, 3.0),\n        Vector::new(1.2, 0.3, -4.0),    // Focal point\n        Direction::new(0.0, 1.0, 0.0),\n        45.0,\n        (width / height) as f64,\n        1.0 / 12.0,\n    );\n\n    let red_color = Color::new(0.7, 0.3, 0.3);\n    let yellow_color = Color::new(0.8, 0.6, 0.1);\n    let white_color = Color::new(1.0, 1.0, 1.0);\n    let green_color = Color::new(0.6, 0.8, 0.2);\n\n    let red_diffuse_material = Material::Diffuse(Diffuse { color: red_color });\n    let blue_diffuse_material = Material::Diffuse(Diffuse { color: Color::new(0.3, 0.3, 0.8) });\n    let blue_metallic_material = Material::Metal(Metal { albedo: Color::new(0.8, 0.8, 0.95), fuzz: 0.7 });\n    let yellow_metallic_material = Material::Metal(Metal { albedo: Color::new(0.8, 0.6, 0.2), fuzz: 0.2 });\n    let dielectric_material = Material::Dielectric(Dielectric { albedo: white_color, refraction_index: 1.5 });\n    let yellow_dielectric_material = Material::Dielectric(Dielectric { albedo: yellow_color, refraction_index: 1.1 });\n\n\n    let objects: Scene = vec![\n        ObjectTypes::new_sphere( Point::new(0.0, -601.0, -1.0), 600.0, Material::Diffuse(Diffuse { color: green_color })),\n        ObjectTypes::new_sphere( Point::new(-1.4, -0.5, -3.0), 1.0,  blue_diffuse_material.clone()),\n\n        // Hollow Bubble\n        ObjectTypes::new_sphere( Point::new(0.6, -0.3, -2.0), 0.5,  dielectric_material.clone() ),\n        ObjectTypes::new_sphere( Point::new(0.6, -0.3, -2.0), -0.495, dielectric_material.clone() ),\n\n        ObjectTypes::new_sphere( Point::new(1.8, 0.0, -1.6), 0.2,  yellow_dielectric_material.clone() ),\n        ObjectTypes::new_sphere(Point::new(1.5, 0.0, -4.0), 1.5, yellow_metallic_material.clone() ),\n        ObjectTypes::new_sphere( Point::new(2.5, -1.0, -2.5), 0.5,  red_diffuse_material.clone() ),\n        ObjectTypes::new_sphere(Point::new(2.8, 0.0, -2.0), 0.5, blue_metallic_material.clone() ),\n\n        ObjectTypes::new_triangle(Point::new(-0.4, 0.0, -3.0), Point::new(-0.4, 1.0, -3.0), Point::new(0.3, 0.3, -2.0), blue_diffuse_material.clone()),\n        ObjectTypes::new_triangle(Point::new(-0.4, 1.0, -3.0), Point::new(0.6, 1.0, -3.5), Point::new(0.3, 0.3, -2.0), red_diffuse_material.clone()),\n    ];\n\n    let mut img = RgbImage::new(width, height);\n\n    println!(\"Raytracing\");\n    raytrace(camera, \u0026objects, options, \u0026mut img);\n    println!(\"Saving image to file\");\n    img.save(\"samples/output.png\");\n}\n```\n\n![](./samples/output.png)\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhardbyte%2Frustyscene","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhardbyte%2Frustyscene","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhardbyte%2Frustyscene/lists"}