Skip to content

Instantly share code, notes, and snippets.

@rossant
Created January 28, 2015 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rossant/9231499ff251526ab085 to your computer and use it in GitHub Desktop.
Save rossant/9231499ff251526ab085 to your computer and use it in GitHub Desktop.
Point sprint example with VisPy
import sys
import numpy as np
from vispy import app, scene
canvas = scene.SceneCanvas(keys='interactive')
view = canvas.central_widget.add_view()
view.set_camera('turntable', mode='perspective', up='z', distance=2,
azimuth=30., elevation=30.)
pos = .25 * np.random.randn(1000, 3)
colors = np.random.uniform(size=(1000, 3), low=.5, high=.8)
p1 = scene.visuals.Markers()
p1.set_data(pos, face_color=colors)
view.add(p1)
if __name__ == '__main__':
canvas.show()
if sys.flags.interactive == 0:
app.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment