Polyscope 3D Viewer

2.6.1 · active · verified Fri Apr 17

Polyscope is a Python library that provides an interactive 3D viewer and user interface for visualizing a variety of 3D data types, including point clouds, surface meshes, volumes, and general purpose quantities. It is built on a C++ core for performance and offers an intuitive GUI. The current version is 2.6.1, and it maintains a frequent release cadence, typically with minor versions released every 1-2 months.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart initializes the Polyscope viewer, registers a simple random point cloud and a basic surface mesh with distinct colors, then displays the interactive GUI.

import polyscope as ps
import numpy as np

# Initialize polyscope
ps.init()

# Register a point cloud
pts = np.random.rand(100, 3)
ps.register_point_cloud("my_points", pts, color=[0.3, 0.5, 0.8])

# Register a surface mesh
V = np.array([[0,0,0.], [1,0,0.], [0,1,0.], [1,1,0.]])
F = np.array([[0,1,2], [1,3,2]])
ps.register_surface_mesh("my_mesh", V, F, color=[0.8, 0.5, 0.3])

# Show the gui and keep it open
ps.show()

view raw JSON →