{"id":19567428,"url":"https://github.com/paulgb/penkit","last_synced_at":"2025-05-07T18:09:20.932Z","repository":{"id":54745568,"uuid":"113250063","full_name":"paulgb/penkit","owner":"paulgb","description":"Tools for pen plotting in Python","archived":false,"fork":false,"pushed_at":"2021-02-01T06:16:23.000Z","size":6518,"stargazers_count":151,"open_issues_count":4,"forks_count":9,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-05-07T18:08:12.221Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","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/paulgb.png","metadata":{"files":{"readme":"README.rst","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":"2017-12-06T00:49:54.000Z","updated_at":"2025-05-02T09:28:40.000Z","dependencies_parsed_at":"2022-08-14T01:30:51.781Z","dependency_job_id":null,"html_url":"https://github.com/paulgb/penkit","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/paulgb%2Fpenkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulgb%2Fpenkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulgb%2Fpenkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulgb%2Fpenkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paulgb","download_url":"https://codeload.github.com/paulgb/penkit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252931535,"owners_count":21827111,"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":[],"created_at":"2024-11-11T05:37:22.011Z","updated_at":"2025-05-07T18:09:20.895Z","avatar_url":"https://github.com/paulgb.png","language":"Jupyter Notebook","funding_links":[],"categories":["Software"],"sub_categories":["Vector Creation"],"readme":"Penkit\n======\n\n**Penkit** is a library of utility functions generating `pen plots \u003chttps://en.wikipedia.org/wiki/Plotter\u003e`__ from Python/numpy.\n\nInstallation\n------------\n\nRequirements: Python 2.7 or 3.x, `numpy`, `scipy`. Preview modules require `ipython` or `matplotlib`.\n\n    # pip install penkit\n\nDocumentation\n-------------\n\n- Download the `tutorial notebooks \u003ctutorial\u003e`_ or `run them on Binder \u003chttps://mybinder.org/v2/gh/paulgb/penkit.git/master?filepath=tutorial\u003e`_\n- `Module Documentation \u003chttp://penkit.readthedocs.io/en/latest/\u003e`_\n\nExamples\n--------\n\nGrid Surface Projection\n~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code:: python\n\n    from penkit.textures import make_grid_texture\n    from penkit.textures.util import rotate_texture\n    from penkit.surfaces import make_noise_surface\n    from penkit.write import write_plot\n    from penkit.projection import project_and_occlude_texture\n    \n    # create a texture\n    grid_density = 68\n    texture = make_grid_texture(grid_density, grid_density, 100)\n    \n    # rotate the texture\n    texture = rotate_texture(texture, rotation=65)\n    \n    # create the surface\n    surface = make_noise_surface(blur=28, seed=12345) * 10\n    \n    # project the texture onto the surface\n    proj = project_and_occlude_texture(texture, surface, angle=69)\n    \n    # plot the result\n    write_plot([proj], 'examples/grid_surface.svg')\n\n.. image:: examples/grid_surface.svg\n   :width: 400px\n\nHilbert Curve Surface Projection\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code:: python\n\n    from penkit.fractal import hilbert_curve\n    from penkit.textures.util import fit_texture, rotate_texture\n    from penkit.surfaces import make_noise_surface\n    from penkit.projection import project_and_occlude_texture\n    from penkit.write import write_plot\n    \n    # create a texture\n    texture = hilbert_curve(7)\n    \n    # rotate the texture\n    texture = rotate_texture(texture, 30)\n    texture = fit_texture(texture)\n    \n    # create the surface\n    surface = make_noise_surface(blur=30) * 5\n    \n    # project the texture onto the surface\n    proj = project_and_occlude_texture(texture, surface, 50)\n    \n    # plot the result\n    write_plot([proj], 'examples/hilbert_surface.svg')\n\n.. image:: examples/hilbert_surface.svg\n   :width: 400px\n\n----\n\n.. image:: https://travis-ci.org/paulgb/penkit.svg?branch=master\n   :target: https://travis-ci.org/paulgb/penkit\n\n.. image:: https://mybinder.org/badge.svg\n   :target: https://mybinder.org/v2/gh/paulgb/penkit.git/master?filepath=tutorial\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulgb%2Fpenkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulgb%2Fpenkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulgb%2Fpenkit/lists"}