{"id":15472083,"url":"https://github.com/encukou/bresenham","last_synced_at":"2025-09-11T15:31:26.853Z","repository":{"id":57416348,"uuid":"74617338","full_name":"encukou/bresenham","owner":"encukou","description":"A simple implementation of Bresenham's line drawing algorithm","archived":false,"fork":false,"pushed_at":"2020-10-03T13:20:56.000Z","size":8,"stargazers_count":64,"open_issues_count":0,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-10T21:12:28.252Z","etag":null,"topics":["bresenham","bresenham-algorithm"],"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/encukou.png","metadata":{"files":{"readme":"README","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-23T22:01:49.000Z","updated_at":"2025-09-01T22:06:13.000Z","dependencies_parsed_at":"2022-09-16T08:52:49.436Z","dependency_job_id":null,"html_url":"https://github.com/encukou/bresenham","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/encukou/bresenham","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/encukou%2Fbresenham","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/encukou%2Fbresenham/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/encukou%2Fbresenham/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/encukou%2Fbresenham/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/encukou","download_url":"https://codeload.github.com/encukou/bresenham/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/encukou%2Fbresenham/sbom","scorecard":{"id":376725,"data":{"date":"2025-08-11","repo":{"name":"github.com/encukou/bresenham","commit":"efe416dddab8cb22f81bb3f926993eeff04a5665"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":1,"reason":"Found 1/9 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T14:25:57.608Z","repository_id":57416348,"created_at":"2025-08-18T14:25:57.608Z","updated_at":"2025-08-18T14:25:57.608Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274660094,"owners_count":25326130,"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","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"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":["bresenham","bresenham-algorithm"],"created_at":"2024-10-02T02:26:21.167Z","updated_at":"2025-09-11T15:31:26.556Z","avatar_url":"https://github.com/encukou.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"The bresenham module\n====================\n\nA simple implementation of Bresenham's line drawing algorithm.\n\nSee `the Wikipedia entry`_ for details on what that is.\n\n.. _the Wikipedia entry: https://en.wikipedia.org/wiki/Bresenham's_line_algorithm\n\nNote that this is a simple implementation.\nIt is written in Pure Python (without e.g. `numpy`), so it is relatively slow.\n\nI found some beauty in combining the classic algorithm (whose ingenuity lies in\nusing only integers – a constraint that isn't really as relevant now)\nwith a Python generator (a modern device that follows the spirit of\n“executable pseudocode”, abstracting away the output subroutine).\nI hope others can appreciate the code as well.\n\nFor serious use, look at these:\n\n* `skimage.draw.line`_, which solves the same problem *fast*.\n* A `Numpy-based recipe`_ that generalizes the solution to \u003cvar\u003eN\u003c/var\u003e\n  dimensions.\n* `wasabigeom`_, a 2D vector library made for games\n\n.. _`skimage.draw.line`: http://scikit-image.org/docs/dev/api/skimage.draw.html#skimage.draw.line\n.. _`Numpy-based recipe`: http://code.activestate.com/recipes/578112-bresenhams-line-algorithm-in-n-dimensions/\n.. _`wasabigeom`: https://pypi.org/project/wasabi-geom/\n\n\nInstallation\n============\n\nIn a Python virtual environment, do::\n\n    python -m pip install bresenham\n\nTo install from a Git checkout (in editable mode)::\n\n    python -m pip install -e.\n\nTo install without a virtual envitonment, add the ``--user`` option.\n\n\nUsage\n=====\n\nThe ``bresenham(x0, y0, x1, y1)`` function returns a generator of\nthe coordinates of the line from ``(x0, y0)`` to ``(x1, y1)``.\n\nFor example, the coordinates of a line from (-1, -4) to (3, 2), are::\n\n    \u003e\u003e\u003e from bresenham import bresenham\n\n    \u003e\u003e\u003e list(bresenham(-1, -4, 3, 2))\n    [(-1, -4), (0, -3), (0, -2), (1, -1), (2, 0), (2, 1), (3, 2)]\n\n\nDevelopment\n===========\n\nYou're welcome to join this project!\n\nIf you spot an issue, please report it at the `Issues page`_ on Github.\n\nIf you'd like to start changing the code or documentation, check out the code\nlocally using::\n\n    git clone https://github.com/encukou/bresenham\n\nIf you're new to this, please read the `this guide`_ about collaborating\non Github-hosted projects like this one.\n\nIf that doesn't make sense, please `e-mail the author \u003cencukou@gmail.com\u003e`_\nfor clarification. I'd be happy to help you get started.\n\n.. _Issues page: https://github.com/encukou/bresenham/issues\n.. _this guide: https://guides.github.com/activities/contributing-to-open-source/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fencukou%2Fbresenham","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fencukou%2Fbresenham","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fencukou%2Fbresenham/lists"}