{"id":15723739,"url":"https://github.com/epilys/bitmappers-companion","last_synced_at":"2026-03-09T11:05:02.752Z","repository":{"id":45163203,"uuid":"429367651","full_name":"epilys/bitmappers-companion","owner":"epilys","description":"zine/book about bitmap drawing algorithms and math with code examples in Rust","archived":false,"fork":false,"pushed_at":"2022-09-28T16:28:14.000Z","size":28544,"stargazers_count":48,"open_issues_count":0,"forks_count":1,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-05-07T08:45:00.832Z","etag":null,"topics":["bitmap","book","latex","raster","raster-graphics","rust","zine"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/epilys.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}},"created_at":"2021-11-18T09:22:46.000Z","updated_at":"2025-02-07T10:33:58.000Z","dependencies_parsed_at":"2023-01-18T17:36:40.368Z","dependency_job_id":null,"html_url":"https://github.com/epilys/bitmappers-companion","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/epilys/bitmappers-companion","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epilys%2Fbitmappers-companion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epilys%2Fbitmappers-companion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epilys%2Fbitmappers-companion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epilys%2Fbitmappers-companion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/epilys","download_url":"https://codeload.github.com/epilys/bitmappers-companion/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epilys%2Fbitmappers-companion/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30291855,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:57:19.223Z","status":"ssl_error","status_checked_at":"2026-03-09T02:56:26.373Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bitmap","book","latex","raster","raster-graphics","rust","zine"],"created_at":"2024-10-03T22:13:09.397Z","updated_at":"2026-03-09T11:05:02.734Z","avatar_url":"https://github.com/epilys.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A Bitmapper's Companion - zine/book about bitmap drawing algorithms and math with code examples in Rust\n\nA small zine/book written in LaTeX. In progress. See Building section below for how to build.\n\n[View current PDF build here](./build/bitgeom.pdf?raw=true)\n\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to show planned contents\u003c/summary\u003e\n\n\n1. **Introduction**\n  - Data representation\n  - Displaying pixels to your screen\n  - Bits to byte pixels\n  - Loading graphics files in Rust\n  - Including xbm files in Rust\n2. **Points And Lines**\n  - Distance between two points\n  - Equations of a line\n    - *Line through a point 𝑃 = (𝑥𝑝, 𝑦𝑝) and a slope 𝑚*\n    - *Line through two points*\n  - Distance from a point to a line\n    - *Using the implicit equation form*\n    - *Using an 𝐿 defined by two points 𝑃1, 𝑃2*\n    - *Using an 𝐿 defined by a point 𝑃𝑙 and angle ̂𝜃*\n    - *Find perpendicular to line that passes through given point*\n  - Angle between two lines\n    - *Intersection of two lines*\n    - *Line equidistant from two points*\n    - *Normal to a line through a point*\n3. **Points And Line Segments**\n  - Drawing a line segment from its two endpoints\n  - Drawing line segments with width\n  - Intersection of two line segments\n    - *Fast intersection of two line segments*\n  - Points, Lines and Circles\n  - Equations of a circle\n  - Bounding circle\n4. **Curves other than circles**\n  - Parametric elliptical arcs\n  - Bézier curves\n5. **Points, Lines and Shapes**\n  - Union, intersection and difference of polygons\n  - Centroid of polygon\n  - Polygon clipping\n  - Triangle filling\n  - Flood filling\n6. **Vectors, matrices and transformations**\n  - Rotation of a bitmap\n    - *Fast 2D Rotation*\n  - 90° Rotation of a bitmap by parallel recursive subdivision\n  - Magnification/Scaling\n    - *Smoothing enlarged bitmaps*\n    - *Stretching lines of bitmaps*\n  - Mirroring\n  - Shearing\n    - *The relationship between shearing factor and angle*\n  - Projections\n7. **Addendum**\n  - Faster Drawing a line segment from its two endpoints using Sym-\nmetry\n  - Joining the ends of two wide line segments together\n  - Composing monochrome bitmaps with separate alpha channel data\n  - Orthogonal connection of two points\n  - Join segments with round corners\n  - Faster line clipping\n  - Space-filling Curves\n    - *Hilbert curve*\n    - *Sierpiński curve*\n    - *Peano curve*\n    - *Z-order curve*\n    - *flowsnake curve*\n  - Dithering\n    - *Floyd-Steinberg*\n    - *Atkinson dithering*\n  - Marching squares\n\n\u003c/details\u003e\n\n## Samples\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\u003ckbd\u003e\n\n![cover_sample](./samples/cover_sample.png?raw=true)\n\n\u003c/kbd\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003ckbd\u003e\n\n![thumb_sample](./samples/thumb_sample.png?raw=true)\n\n\u003c/kbd\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003cth\u003eCover\u003c/th\u003e\n\u003cth\u003e\n\n[Thumb index](https://en.wikipedia.org/wiki/Thumb_index) overview\n\n\u003c/th\u003e\n\u003c/tr\u003e\n\n\u003ctr\u003e\n\u003ctd\u003e\n\u003ckbd\u003e\n\n![frontmatter_sample](./samples/frontmatter_sample.png?raw=true)\n\n\u003c/kbd\u003e\n\u003c/td\u003e\n\u003ctd\u003e\n\u003ckbd\u003e\n\n![frontmatter_sample2](./samples/frontmatter_sample2.png?raw=true)\n\n\u003c/kbd\u003e\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003cth\u003e Frontmatter\u003c/th\u003e\u003cth\u003econtents\u003c/th\u003e\n\u003ctr/\u003e\n\u003ctr\u003e\n\u003ctd\u003e\n\n\u003ckbd\u003e\n\n![page_sample](./samples/page_sample.png?raw=true)\n\n\u003c/kbd\u003e\n\n\u003c/td\u003e\n\u003ctd\u003e\n\n\n![bezier interactive demo](./samples/bezier_interactive.gif?raw=true)\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\u003cth\u003ePage spread\u003c/th\u003e\u003cth\u003eBezier interactive demo\u003c/th\u003e\u003c/tr\u003e\n\u003c/table\u003e\n\n\n## Building\n\nRun `make` (might need to run it twice), output will be in the `./build` directory.\n\nTo run the rust example binaries, first you can inspect them with `ls ./src/bin/`, for example:\n\n```shell\n$ ls ./src/bin\natkinsondither.rs\nbeams.rs\nbezierglyph.rs\nbezier.rs\nboundingcircle.rs\nbresenham.rs\ndistance_between_two_points.rs\nfloyddither.rs\nfonts.rs\nhilbert.rs\nintroduction.rs\nrotation.rs\nscale.rs\nshearing.rs\nsmooth_scale.rs\nxbmtors.rs\nzcurve.rs\n```\n\nThen execute one with `cargo run --bin` for example `cargo run --bin atkinsondither`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepilys%2Fbitmappers-companion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fepilys%2Fbitmappers-companion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepilys%2Fbitmappers-companion/lists"}