{"id":13422183,"url":"https://github.com/nmwsharp/polyscope","last_synced_at":"2025-05-13T17:04:55.500Z","repository":{"id":37744920,"uuid":"111565012","full_name":"nmwsharp/polyscope","owner":"nmwsharp","description":"A C++ \u0026 Python viewer for 3D data like meshes and point clouds","archived":false,"fork":false,"pushed_at":"2025-04-02T08:55:37.000Z","size":25344,"stargazers_count":1932,"open_issues_count":109,"forks_count":213,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-04-24T01:59:37.603Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://polyscope.run","language":"C++","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/nmwsharp.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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-11-21T15:13:38.000Z","updated_at":"2025-04-23T04:45:21.000Z","dependencies_parsed_at":"2023-10-16T16:18:39.481Z","dependency_job_id":"c9a956c1-dbff-4620-9c10-0e2f15c4fa42","html_url":"https://github.com/nmwsharp/polyscope","commit_stats":{"total_commits":802,"total_committers":23,"mean_commits":"34.869565217391305","dds":0.2194513715710723,"last_synced_commit":"39fdbda277d147fd70c4bc344250d8b578f1ce12"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmwsharp%2Fpolyscope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmwsharp%2Fpolyscope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmwsharp%2Fpolyscope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmwsharp%2Fpolyscope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nmwsharp","download_url":"https://codeload.github.com/nmwsharp/polyscope/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253990460,"owners_count":21995774,"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-07-30T23:00:38.668Z","updated_at":"2025-05-13T17:04:55.478Z","avatar_url":"https://github.com/nmwsharp.png","language":"C++","readme":"# Polyscope's documentation is hosted at [polyscope.run](http://polyscope.run)\n\nTo contribute, check out the [instructions here](https://polyscope.run/about/contributing/).\n\n![Polyscope](http://polyscope.run/media/teaser.svg)\n\n[![actions status linux](https://github.com/nmwsharp/polyscope/workflows/linux/badge.svg)](https://github.com/nmwsharp/polyscope/actions)\n[![actions status macOS](https://github.com/nmwsharp/polyscope/workflows/macOS/badge.svg)](https://github.com/nmwsharp/polyscope/actions)\n[![actions status windows](https://github.com/nmwsharp/polyscope/workflows/windows/badge.svg)](https://github.com/nmwsharp/polyscope/actions)\n![PyPI](https://img.shields.io/pypi/v/polyscope?style=flat-square)\n\nPolyscope is a C++/Python viewer and user interface for 3D data such as meshes and point clouds. It allows you to register your data and quickly generate informative and beautiful visualizations, either programmatically or via a dynamic GUI. Polyscope is designed to be lightweight---it does not \"take ownership\" over your entire program, and it is easy to integrate with existing codebases and popular libraries. The lofty objective of Polyscope is to offer a useful visual interface to your data via a single line of code.\n\nPolyscope uses a paradigm of *structures* and *quantities*. A **structure** is a geometric object in the scene, such as a surface mesh or point cloud. A **quantity** is data associated with a structure, such as a scalar function or a vector field.\n\nWhen any of these structures and quantities are registered, Polyscope displays them in an interactive 3D scene, handling boilerplate concerns such as toggling visibility, color-mapping data and adjusting maps, \"picking\" to click in the scene and query numerical quantities, etc.\n\nC++:\n\n``` C++\n#include \"polyscope/polyscope.h\"\n#include \"polyscope/point_cloud.h\"\n#include \"polyscope/surface_mesh.h\"\n\n// Initialize polyscope\npolyscope::init();\n\n// Register a point cloud\n// `points` is a Nx3 array-like container of points\npolyscope::registerPointCloud(\"my points\", points);\n\n// Register a surface mesh structure\n// `meshVerts` is a Vx3 array-like container of vertex positions\n// `meshFaces` is a Fx3 array-like container of face indices  \npolyscope::registerSurfaceMesh(\"my mesh\", meshVerts, meshFaces);\n\n// Add a scalar and a vector function defined on the mesh\n// `scalarQuantity` is a length V array-like container of values\n// `vectorQuantity` is an Fx3 array-like container of vectors per face\npolyscope::getSurfaceMesh(\"my mesh\")-\u003eaddVertexScalarQuantity(\"my_scalar\", scalarQuantity);\npolyscope::getSurfaceMesh(\"my mesh\")-\u003eaddFaceVectorQuantity(\"my_vector\", vectorQuantity);\n\n// View the point cloud and mesh we just registered in the 3D UI\npolyscope::show();\n```\n\nPython:\n``` python\nimport polyscope as ps\n\n# Initialize polyscope\nps.init()\n\n### Register a point cloud\n# `my_points` is a Nx3 numpy array\nps.register_point_cloud(\"my points\", my_points)\n\n### Register a mesh\n# `verts` is a Nx3 numpy array of vertex positions\n# `faces` is a Fx3 array of indices, or a nested list\nps.register_surface_mesh(\"my mesh\", verts, faces, smooth_shade=True)\n\n# Add a scalar function and a vector function defined on the mesh\n# vertex_scalar is a length V numpy array of values\n# face_vectors is an Fx3 array of vectors per face\nps.get_surface_mesh(\"my mesh\").add_scalar_quantity(\"my_scalar\", \n        vertex_scalar, defined_on='vertices', cmap='blues')\nps.get_surface_mesh(\"my mesh\").add_vector_quantity(\"my_vector\", \n        face_vectors, defined_on='faces', color=(0.2, 0.5, 0.5))\n\n# View the point cloud and mesh we just registered in the 3D UI\nps.show()\n```\n\nPolyscope is designed to make your life easier. It is simple to build, and fewer than 10 lines of code should be sufficient to start visualizing. In C++, some [template magic](https://polyscope.run/data_adaptors/) means Polyscope can probably accept the data types you're already using!\n\n---\nAuthor: [Nicholas Sharp](http://www.nmwsharp.com)\n\nIf Polyscope contributes to an academic publication, cite it as:\n```bib\n@misc{polyscope,\n  title = {Polyscope},\n  author = {Nicholas Sharp and others},\n  note = {www.polyscope.run},\n  year = {2019}\n}\n```\n\nDevelopment of this software was funded in part by NSF Award 1717320, an NSF graduate research fellowship, and gifts from Adobe Research and Autodesk, Inc.\n","funding_links":[],"categories":["C++","Game-Math","Data Visualization and Mission Control","Libraries","Visualization","Softwares and Libraries","Modeling and Meshes","Graphics"],"sub_categories":["Point Cloud","Geometry","Mesh tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnmwsharp%2Fpolyscope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnmwsharp%2Fpolyscope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnmwsharp%2Fpolyscope/lists"}