{"id":16550436,"url":"https://github.com/byanko55/gemmini","last_synced_at":"2026-01-24T14:45:31.443Z","repository":{"id":213726383,"uuid":"732663330","full_name":"byanko55/gemmini","owner":"byanko55","description":"Python package for visualizing and manipulating diverse geometric shapes.","archived":false,"fork":false,"pushed_at":"2024-04-26T02:05:12.000Z","size":6607,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-25T04:39:19.470Z","etag":null,"topics":["2d-graphics","geometry","plotting-in-python","shape","visualization"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/byanko55.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}},"created_at":"2023-12-17T12:46:35.000Z","updated_at":"2025-04-11T22:00:35.000Z","dependencies_parsed_at":"2024-03-09T07:45:10.523Z","dependency_job_id":null,"html_url":"https://github.com/byanko55/gemmini","commit_stats":null,"previous_names":["byanko55/gemplib","byanko55/gemmini"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/byanko55/gemmini","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byanko55%2Fgemmini","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byanko55%2Fgemmini/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byanko55%2Fgemmini/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byanko55%2Fgemmini/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/byanko55","download_url":"https://codeload.github.com/byanko55/gemmini/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/byanko55%2Fgemmini/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28730187,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T10:24:43.181Z","status":"ssl_error","status_checked_at":"2026-01-24T10:24:36.112Z","response_time":89,"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":["2d-graphics","geometry","plotting-in-python","shape","visualization"],"created_at":"2024-10-11T19:34:23.154Z","updated_at":"2026-01-24T14:45:31.427Z","avatar_url":"https://github.com/byanko55.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gemmini\n\n[![Pypi](https://img.shields.io/badge/pypi-1.0.2-blue.svg)](https://pypi.org/project/gemmini/)\n[![Python](https://img.shields.io/badge/python-%3E%3D%203.7-green.svg)](https://www.python.org/downloads/)\n[![pytest](https://github.com/byanko55/gemmini/actions/workflows/pytest.yml/badge.svg)](https://github.com/byanko55/gemmini/actions/workflows/pytest.yml)\n[![](https://img.shields.io/badge/License-BSD%203--Clause-orange.svg)](https://opensource.org/licenses/MIT)\n\n\n\u003e Python package for visualizing and manipulating diverse geometric shapes.\n\n![Demo 1](https://i.ibb.co/9s4twNn/all-with-interior.webp)\n![Demo 2](https://i.ibb.co/0QSnDdZ/all-with-exterior.webp)\n\n\n`Gemmini` provides **70+ geometry classes** including common polygons, curves, and symbols. Built with `numpy` and `matplotlib` packages, it supports easy manipulation and illustration of geometry, while plenty of useful functions for mathematical analysis and 2D/3D transformation are also available.\n\n## Geometries supported by Gemmini\n\n### Pointset\n* Point\n* Pointcloud\n* Grid\n\n### Line\n* Line\n* Segment\n\n### Polygon\n* RegularPolygon\n* IsoscelesTriangle\n* RightTriangle\n* Parallelogram\n* Rhombus\n* Trapezoid\n* RightTrapezoid\n* Rectangle\n* Kite\n* ConcaveKite\n* ConcaveStar\n\n### Curve\n* Circle\n* Arc\n* Ellipse\n* Spiral\n* HyperbolicSpiral\n* ParabolicSpiral\n* LituusSpiral\n* LogarithmicSpiral\n* BoundedSpiral\n* Cycloid\n* Epicycloid\n* Hypocycloid\n* CurvedPolygon\n* Lissajous\n* Folium\n* Bifolium\n\n### Other shapes\n* CircularSector\n* CircularSegment\n* Wave\n* Helix\n* Parabola\n* SymmetricSpiral\n* Star\n* Heart\n* ButterFly\n* CottonCandy\n* Boomerang\n* Stellate\n* Shuriken\n* Flower_A\n* Flower_B\n* Flower_C\n* Flower_D\n* Flower_E\n* Flower_F\n* Clover\n* FattyStar\n* Moon\n* Yinyang\n* Polygontile\n* Gear\n* SnippedRect\n* RoundedRect\n* Plaque\n* Ring\n* BlockArc\n* Cross_A\n* Cross_B\n* Cross_C\n* SunCross\n* CelticCross\n* BasqueCross\n* Lshape\n* HalfFrame\n* Arrow\n* DoubleArrow\n* ArrowPentagon\n* ArrowChevron\n* Teardrop\n* Nosign\n\n## Transformation\n\n```Python\nimport gemmini as gm\n\nf = gm.SunCross(s=9)\ngm.plot((f), fill=True)\n\nf.shatter((2, 4), rate=2)\ngm.plot((f), fill=True)\ngm.plot((f), show_area=True)\n```\n\n![Demo 3](https://i.ibb.co/2P1vcvn/example1.webp)\n\n### List of transformations\n* **Resizing** - `scale`, `scaleX`, `scaleY`\n* **Position Shift** - `translate`, `translateX`, `translateY`\n* **Rotation** - `rotate`, `rotateX`, `rotateY`, `rotateZ`, `rotate3D`\n* **Symmetric Shift** - `flip`, `flipX`, `flipY`, `flipXY`, `flipDiagonal`\n* **Distortion** - `skew`, `skewX`, `skewY`, `distort`, `focus`, `shatter`\n* **Others** - `dot`\n\n## Figure Visualization\n\nCreate a `Canvas`, on which your nice geometries will be drawn. Make a choice of color theme (default: `light`), canvas size, grid opacity, etc. You can plot either a single geometric object or multiple shapes altogether.\n\n```Python\nimport gemmini as gm\nimport numpy as np\n\ncanva = gm.Canvas()\n\ncluster_small = gm.Pointcloud2D(s=0.05, num_dot=10)\ncluster_medium = gm.Pointcloud2D(s=0.1, num_dot=20)\ncluster_large = gm.Pointcloud2D(s=0.2, num_dot=50)\n\ncanva.add((cluster_small, cluster_medium, cluster_large), show_center=True)\ncanva.plot()\n```\n\n![Demo 4](https://i.ibb.co/Vtzhhtt/output5.webp)\n\n### Display Options\n\n* **fill** - fill in the interior of the geometry\n* **show_edges** - draw path enclosing the given geometry\n* **show_radius** - display a radius vector and its length\n* **show_size** - display a height/width of the geometry\n* **show_center** - display (x, y) coordinates of the centroid\n* **show_area** - display the area of the geometry\n* **show_class** - display the class name ot the geometry\n\n```Python\nimport gemmini as gm\n\ncanva = gm.Canvas(theme='horizon')\n\noriginal = gm.IsoscelesTriangle(h=4, w=6)\nfigs = []\n\nfor i in range(6):\n    f = original.copy()\n    f.translate(8*(i%3), 8*(i//3))\n    figs.append(f)\n\ncanva.add(figs[0], fill=True)\ncanva.add(figs[1], show_edges=True)\ncanva.add(figs[2], show_center=True)\ncanva.add(figs[3], show_radius=True)\ncanva.add(figs[4], show_size=True)\ncanva.add(figs[5], show_area=True)\n\ncanva.plot()\n```\n\n![Demo 5](https://i.ibb.co/MVrFFdz/example3.webp)\n\n## Requirements\n\n* **Python** \u003e= 3.7\n* **numpy** \u003e= 1.21\n* **scipy** \u003e= 1.7\n* **matplotlib** \u003e= 3.3\n\n## Work with Shapely\n\nWe added the simple way to convert geometry to a `shapely` object.  \n\n```Python\nimport gemmini as gm\n\nfrom shapely import geometry\nimport matplotlib.pyplot as plt\n\nf = gm.Polygontile(s=4, v=5)\npoly = geometry.Polygon(*f.coordSet())\nprint(poly.wkt)\n```\n\n\u003e POLYGON ((0.8980559531591708 1.2360679774997896, 0.9597258534760096 1.4258684144441638, ... ))\n\n```Python\nfrom shapely.plotting import plot_polygon\n\nplot_polygon(poly)\n```\n\n![Shapely](https://i.ibb.co/LPk95yY/output7.webp)\n\n## Tutorials\n\nThe below page links contain several useful tutorials running on Ipython:\n\n* **Plot a Point/Pointcloud** - [See here](https://github.com/byanko55/gemmini/blob/master/tutorials/test_point.ipynb)\n* **Draw a Infinite/finite Line** - [See here](https://github.com/byanko55/gemmini/blob/master/tutorials/test_line.ipynb)\n* **Draw various Geometries** - [Polygons](https://github.com/byanko55/gemmini/blob/master/tutorials/test_polygon.ipynb), [Polar Curves](https://github.com/byanko55/gemmini/blob/master/tutorials/test_polar.ipynb), [Other Symbols \u0026 Shapes](https://github.com/byanko55/gemmini/blob/master/tutorials/test_shape.ipynb)\n* **Apply Transformation to Geometry** - [See here](https://github.com/byanko55/gemmini/blob/master/tutorials/test_transform.ipynb)\n* **Plot Geometry on Python Interactive Window** - [See here](https://github.com/byanko55/gemmini/blob/master/tutorials/test_canvas.ipynb)\n* **Use case with Shapely package** - [See here](https://github.com/byanko55/gemmini/blob/master/tutorials/test_shapely.ipynb)\n* **List of geometrical illustrations** - [All you want is here!](https://github.com/byanko55/gemmini/blob/master/tutorials/test_all.ipynb)\n\n## Contribution\n\nIf you'd like a new shape, transformation, or other mathematical operations to be included, **feel free to leave a issue on this repo**. We are welcome to any kinds of request and feedbacks! ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyanko55%2Fgemmini","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbyanko55%2Fgemmini","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbyanko55%2Fgemmini/lists"}