{"id":21064429,"url":"https://github.com/scottgigawatt/raytracer","last_synced_at":"2025-03-14T01:30:03.995Z","repository":{"id":233029573,"uuid":"318344782","full_name":"scottgigawatt/raytracer","owner":"scottgigawatt","description":"A fast and customizable C-based raytracer for stunning visualizations","archived":false,"fork":false,"pushed_at":"2020-12-03T23:15:32.000Z","size":833,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-19T17:58:56.412Z","etag":null,"topics":["raytracer","raytracing"],"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/scottgigawatt.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}},"created_at":"2020-12-03T23:14:51.000Z","updated_at":"2024-05-27T03:13:31.000Z","dependencies_parsed_at":"2024-04-13T02:29:07.186Z","dependency_job_id":"33ddda92-0a18-4d7f-9bfe-ff81da4558f9","html_url":"https://github.com/scottgigawatt/raytracer","commit_stats":null,"previous_names":["scottgigawatt/raytracer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottgigawatt%2Fraytracer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottgigawatt%2Fraytracer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottgigawatt%2Fraytracer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottgigawatt%2Fraytracer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scottgigawatt","download_url":"https://codeload.github.com/scottgigawatt/raytracer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234856239,"owners_count":18897402,"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":["raytracer","raytracing"],"created_at":"2024-11-19T17:49:30.561Z","updated_at":"2025-01-20T20:51:03.735Z","avatar_url":"https://github.com/scottgigawatt.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# raytracer\n\nThis project contains a raytracer program for creating computer generated graphics.\n\n## Supported Object Types\n\nThis project currently supports the following object types:\n\n - Plane\n - Procedural shaded plane\n - Tiled plane\n - Finite plane\n - Sphere\n - Procedural shaded sphere\n\n## Supported Light Types\n\nThis project currently supports the following types of light:\n\n - Ambient lighting\n - Diffuse reflection\n - Specular reflection\n\nAn ambient light source represents an omni-directional, fixed-intensity and fixed-color light source that affects all objects in the scene equally [[1]](https://en.wikipedia.org/wiki/Shading#Ambient_lighting).\n\nDiffuse reflection is the reflection of light from a surface such that an incident ray is reflected at many angles rather than at just one angle as in the case of specular reflection [[2]](https://en.wikipedia.org/wiki/Diffuse_reflection).\n\nSpecular reflection, also known as regular reflection is the mirror-like reflection of waves, such as light, from a surface. In this process, each incident ray is reflected, with the reflected ray having the same angle to the surface normal as the incident ray [[3]](https://en.wikipedia.org/wiki/Specular_reflection).\n\n## Input File Examples\n\nFull example files can be found in the [input](input) directory.\n\n### Object Codes\n\nThe full list of object codes can be found in [model.h](src/model.h#L19-L40).\n\n```C\n#define LIGHT        10\n#define SPOTLIGHT    11\n#define PROJECTOR    12\n#define SPHERE       13\n#define PLANE        14\n#define FINITE_PLANE 15\n#define TILED_PLANE  16\n#define TEX_PLANE    17\n#define REF_SPHERE   18\n#define P_SPHERE     19\n#define P_PLANE      20\n#define PARABOLOID   21\n#define CYLINDER     22\n#define CONE         23\n#define HYPERBOLOID  24\n```\n\n### Scene definitions\n\n```\n8 6            World dimensions (x, y)\n0 0 3          Viewpoint        (x, y, z)\n```\n\n### Procedural plane\n\n```\n20             Procedural plane object code\n0 10 5         Ambient  (r, g, b)\n0 0 0          Diffuse  (r, g, b)\n0 0 0          Specular (r, g, b)\n0 0 1          Normal   (x, y, z)\n-4 0 -10       Center   (x, y, z)\n2              Custom shader index\n```\n\n### Finite plane\n```\n15             Finite plane object code\n2 2 2          Ambient   (r, g, b)\n6 0 6          Diffuse   (r, g, b)\n0 0 0          Specular  (r, g, b)\n.5  1  1       Normal    (x, y, z)\n 4 -1 -2       Center    (x, y, z)\n 2  1  1       Direction (x, y, z)\n 7  3          Size      (x, y)\n```\n\n### Tiled plane\n\n```\n16             Tiled plane object code\n0.2 0.2 0.2    Ambient  (r, g, b)\n0.0 0.0 0.0    Diffuse  (r, g, b)\n2.0 2.0 2.0    Specular (r, g, b)\n0 1 0          Normal   (x, y, z)\n0 -8 0         Center   (x, y, z)\n1.0 0.0 1.0    Grid direction \n1.0 1.0        Grid size \n0.2 0.2 0.2    Ambient  (r, g, b)\n3.0 3.0 3.0    Diffuse  (r, g, b)\n0.0 0.0 0.0    Specular (r, g, b)\n```\n\n### Sphere\n\n```\n13             Sphere object code\n5 1 1          Ambient  (r, g, b)\n0 0 0          Diffuse  (r, g, b)\n0 0 0          Specular (r, g, b)\n1.5 -.34 -6    Center   (x, y, z)\n3              Radius\n```\n\n### Light\n\n```\n10             Light object code\n0 5 0          Ambient (r, g, b)\n0 2 5          Center  (x, y, z)\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscottgigawatt%2Fraytracer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscottgigawatt%2Fraytracer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscottgigawatt%2Fraytracer/lists"}