Polyscope's documentation is hosted at polyscope.run
To contribute, check out the instructions here.
Polyscope 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.
Polyscope 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.
When 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.
C++:
#include "polyscope/polyscope.h"
#include "polyscope/surface_mesh.h"
polyscope::init();
polyscope::registerPointCloud("my points", points)
polyscope::registerSurfaceMesh("my mesh", meshVerts, meshFaces);
polyscope::getSurfaceMesh("my mesh")->addVertexScalarQuantity("my_scalar", scalarQuantity);
polyscope::getSurfaceMesh("my mesh")->addFaceVectorQuantity("my_vector", vectorQuantity);
polyscope::show();
Python:
import polyscope as ps
ps.init()
ps.register_point_cloud("my points", my_points)
ps.register_surface_mesh("my mesh", verts, faces, smooth_shade=True)
ps.get_surface_mesh("my mesh").add_scalar_quantity("my_scalar",
vertex_scalar, defined_on='vertices', cmap='blues')
ps.get_surface_mesh("my mesh").add_vector_quantity("my_vector",
face_vectors, defined_on='faces', color=(0.2, 0.5, 0.5))
ps.show()
Polyscope 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 means Polyscope can probably accept the data types you're already using!
Author: Nicholas Sharp
If Polyscope contributes to an academic publication, cite it as:
@misc{polyscope,
title = {Polyscope},
author = {Nicholas Sharp and others},
note = {www.polyscope.run},
year = {2019}
}
Development of this software was funded in part by NSF Award 1717320, an NSF graduate research fellowship, and gifts from Adobe Research and Autodesk, Inc.