{"id":18358061,"url":"https://github.com/archer-01/minirt","last_synced_at":"2025-04-10T02:38:31.782Z","repository":{"id":181272297,"uuid":"520822273","full_name":"Archer-01/miniRT","owner":"Archer-01","description":"Simple Ray Tracer written in C","archived":false,"fork":false,"pushed_at":"2023-12-22T09:16:00.000Z","size":6679,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-15T18:35:51.617Z","etag":null,"topics":["minilibx","raytracing","rendering-3d-graphics"],"latest_commit_sha":null,"homepage":"","language":"C","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/Archer-01.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}},"created_at":"2022-08-03T09:46:10.000Z","updated_at":"2023-08-05T14:17:08.000Z","dependencies_parsed_at":"2023-12-07T18:44:05.022Z","dependency_job_id":null,"html_url":"https://github.com/Archer-01/miniRT","commit_stats":null,"previous_names":["archer-01/minirt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Archer-01%2FminiRT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Archer-01%2FminiRT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Archer-01%2FminiRT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Archer-01%2FminiRT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Archer-01","download_url":"https://codeload.github.com/Archer-01/miniRT/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248144698,"owners_count":21054970,"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":["minilibx","raytracing","rendering-3d-graphics"],"created_at":"2024-11-05T22:16:38.161Z","updated_at":"2025-04-10T02:38:31.748Z","avatar_url":"https://github.com/Archer-01.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# miniRT\n\nminiRT is a simple ray tracer written in C that can render complex scenes with various shapes and lighting effects.\n\n## Features\n\n- Render scenes with planes, spheres, cylinders, and cones.\n- Handle all possible intersections between objects correctly.\n- Resize object properties such as diameter for spheres and width/height for cylinders.\n- Apply translation and rotation transformations to objects, lights, and cameras.\n- Light management with spot brightness, hard shadows, and ambiance lighting.\n- Ambient, diffuse, and specular lighting using the Phong reflection model.\n- Display images in a window with the ability to close cleanly using ESC or the red cross.\n- Color disruption with a checkerboard pattern.\n- Colored and multi-spot lights.\n- Textures for added visual detail.\n\n## Usage\n\nThe program takes a scene description file with the .rt extension as the first argument.\n\n```bash\nmake FAST=1 \u0026\u0026 ./miniRT scene.rt\n```\n\n## Scene Description File\n\nThe scene description file (.rt) defines the elements of the scene using the following syntax:\n\n### Ambient Lighting\n```\nA intensity red,green,blue\n```\n### Camera\n```\nC PositionX,PositionY,PositionZ OriginX,OriginY,OriginZ fieldOfView\n```\n### Light\n```\nL x,y,z brightness r,g,b\n```\n### Sphere\n```\nsp x,y,z d r,g,b shininess,diffuse,specular [ch:r,g,b|tx:/path/to/texture/file.png]\n```\n### Plane\n```\npl x,y,z ox,oy,oz r,g,b shininess,diffuse,specular [ch:r,g,b|tx:/path/to/texture/file.png]\n```\n### Cylinder\n```\ncy x,y,z ox,oy,oz d h r,g,b shininess,diffuse,specular [ch:r,g,b|tx:/path/to/texture/file.png]\n```\n### Cone\n#### Cone with two sides\n```\ncn x,y,z ox,oy,oz d h r,g,b shininess,diffuse,specular [ch:r,g,b|tx:/path/to/texture/file.png]\n```\n#### Cone with one side\n```\ncnh x,y,z ox,oy,oz d h r,g,b shininess,diffuse,specular [ch:r,g,b|tx:/path/to/texture/file.png]\n```\n### Comments\nUse `#` for single line comments.\n```\n# This is a valid comment\nA 1 255,255,255 # but this is invalid\n```\n## Example scene\n```\n# Ambient\nA 1 184,232,252\n\n# Camera\nC 0,0,-5 0,0,1 50\n\n# Lights\nL -10,10,-10 0.7 255,255,255\n\n# Planes\npl 0,-1,0 0,1,0 255,255,255 200,1,0\n\n# Cones\ncnh 0,-1,0 0,1,0 1 1.5 255,255,255 200,1,0 tx:textures/waffle.png\n\n# Spheres\nsp 0,0.6,0 1 255,255,255 200,1,0 tx:textures/strawberry.png\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcher-01%2Fminirt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farcher-01%2Fminirt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcher-01%2Fminirt/lists"}