{"id":18557271,"url":"https://github.com/mlazaric/photon","last_synced_at":"2025-05-15T14:09:21.499Z","repository":{"id":128140604,"uuid":"160247360","full_name":"mlazaric/Photon","owner":"mlazaric","description":"A simple python script for simulating a photon moving through 2D space and reflecting off circular mirrors with integer center coordinates and radius of 1/3.","archived":false,"fork":false,"pushed_at":"2018-12-22T15:22:31.000Z","size":69,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-17T11:42:06.212Z","etag":null,"topics":["dismat2","geometry","python","reflection","simulation","sympy","visualization"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mlazaric.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":"2018-12-03T20:08:24.000Z","updated_at":"2019-02-23T17:58:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"058358a7-d462-4c83-b3ff-a5950dcb447f","html_url":"https://github.com/mlazaric/Photon","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlazaric%2FPhoton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlazaric%2FPhoton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlazaric%2FPhoton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlazaric%2FPhoton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlazaric","download_url":"https://codeload.github.com/mlazaric/Photon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254355332,"owners_count":22057354,"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":["dismat2","geometry","python","reflection","simulation","sympy","visualization"],"created_at":"2024-11-06T21:35:09.106Z","updated_at":"2025-05-15T14:09:16.483Z","avatar_url":"https://github.com/mlazaric.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Photon\n\n## Introduction\n\nA simple python script for simulating a photon moving through\n2D space and reflecting off circular mirrors with integer center\ncoordinates and radius of `1/3`.\n\nIt was created as a project for the [DisCont mathematics 2](https://www.fer.unizg.hr/en/course/dismat2)\ncourse at the Faculty of Electrical Engineering and Computing, University of Zagreb.\n\n## Installation\n\nRequires at least `python 3.6`.\n\n```\npip install -r requirements.txt\n```\n\n## Usage\n\n```\npython photon.py\n```\n\n## Default Simulation\n\n * Initial position: `(0.5, 0.26)`\n * Initial direction: to the right (`angle = 0`)\n * Distance to cover: `20`\n\n### Resulting Points\n\n```\n 0.500000000000000  0.260000000000000\n 0.791406828704506  0.260000000000000\n 0.886170271613143  0.686704765362629\n 0.162337791730933 -0.708868496230595\n 0.984960971593482  0.667006098050281\n 1.167217449205239  0.288356438791307\n 6.866225811762536  0.694687737435067\n 7.223030282328772  0.247726874350482\n 7.668755609754211 -0.037259428898021\n 7.045625464852359 -0.669803955099221\n 6.836903569092180 -0.290707181432179\n 6.073913889728304 -0.325035148893690\n 5.166352723084377 -0.711143837466597\n 5.116816692422782 -0.312193804362791\n 6.029650514360244 -1.667988015111978\n 6.666874246414737 -1.011761947515690\n 5.885223292792086 -0.312949546402643\n 4.094556605959575 -0.360326614974185\n```\n\n### Resulting Image\n\n![images/result.png](images/result.png)\n\n## Related Projects\n\n * [PhotonReflection](https://github.com/LMesaric/PhotonReflection) by [@LMesaric](https://github.com/LMesaric)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlazaric%2Fphoton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlazaric%2Fphoton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlazaric%2Fphoton/lists"}