{"id":16164129,"url":"https://github.com/tleguern/krt","last_synced_at":"2025-04-07T04:47:23.691Z","repository":{"id":141735042,"uuid":"329390805","full_name":"tleguern/krt","owner":"tleguern","description":"Korn shell RayTracer","archived":false,"fork":false,"pushed_at":"2023-06-28T09:53:47.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-13T09:18:05.289Z","etag":null,"topics":["kornshell","raytracer","shell"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/tleguern.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":"2021-01-13T18:02:06.000Z","updated_at":"2023-01-26T21:17:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"398b61d1-6ba7-4c2a-9160-47d712a38ba2","html_url":"https://github.com/tleguern/krt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tleguern%2Fkrt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tleguern%2Fkrt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tleguern%2Fkrt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tleguern%2Fkrt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tleguern","download_url":"https://codeload.github.com/tleguern/krt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247595378,"owners_count":20963943,"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":["kornshell","raytracer","shell"],"created_at":"2024-10-10T02:45:25.187Z","updated_at":"2025-04-07T04:47:23.643Z","avatar_url":"https://github.com/tleguern.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## krt\n\nThe Korn shell RayTracer\n\n## Contents\n\n1. [Synopsis](#synopsis)\n2. [Install](#install)\n3. [Tests](#tests)\n4. [Contributing](#contributing)\n5. [License](#license)\n\n## Synopsis\n\n    krt [-s sqrt] [-n nearest]\n\nkrt is the beginning of a raytracer written in pure shell.\nThere is actually nothing particularly _korny_ about it, this is just a reference to my other project [kbf][kbf].\nIt is currently compatible with ksh and bash, and probably with any shell implementing the `local` keyword.\n\nThe option `-s` allows to select among three algorithms to calculate the square root of a given number: `heron`, `newton` and `bakhshali`.\nAll three are implemented in `sqrt.sh`.\nThe default algorithm is `newton` and was picked at random.\n\nThe option `-n` allows to select two methods of finding the nearest approximation of square root: `dynamic` and `fixed`.\nThe first method, `dynamic`, is extremely slow and should not be used.\nThe second, `fixed`, is the default but required a pre-generated list of squares named `perfect_squares.txt`.\n\nSuch a list can be generated beforehand using this helper script:\n\n```\n$ perfect_squares.sh \u003e perfect_squares.txt\n```\n\nFor now there are no scene, no floor, no lights, just a hanging red sphere on a blue background.\nThis is the same as section 5 of [Ray Tracing in One Weekend][raytracinginoneweekend].\n\nHere it is:\n\n![Blue background and red sphere](section5.png)\n\nIt took my laptop 47 minutes to generate it.\n\n## Install\n\n### Requires\n\n* Any a-bit-more-than-POSIX shell.\n\n### Build\n\nThere is a makefile available, just run `make`.\nNote that there are no `install` rule.\n\n## Contributing\n\nEither send [send GitHub pull requests](https://github.com/Aversiste/krt) or [send patches on SourceHut](https://lists.sr.ht/~tleguern/misc).\n\n## License\n\nAll the code is licensed under the ISC License.\n\n[kbf]: https://git.sr.ht/~tleguern/kbf\n[raytracinginoneweekend]: https://raytracing.github.io/books/RayTracingInOneWeekend.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftleguern%2Fkrt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftleguern%2Fkrt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftleguern%2Fkrt/lists"}