
import sys

from vispy import scene
canvas = scene.SceneCanvas(keys='interactive', size=(800, 600), show=True)

view = canvas.central_widget.add_view()
view.camera = 'arcball'
view.padding = 100

sphere = scene.visuals.Sphere(radius=1, method='ico', parent=view.scene,
                              edge_color='black')

if __name__ == '__main__' and sys.flags.interactive == 0:
    canvas.app.run()


import sys

from vispy import scene
from vispy.visuals.transforms import STTransform

canvas = scene.SceneCanvas(keys='interactive', bgcolor='white',
                           size=(800, 600), show=True)

view = canvas.central_widget.add_view()
view.camera = 'arcball'

sphere1 = scene.visuals.Sphere(radius=1, method='latlon', parent=view.scene,
                               edge_color='black')

sphere2 = scene.visuals.Sphere(radius=1, method='ico', parent=view.scene,
                               edge_color='black')

sphere3 = scene.visuals.Sphere(radius=1, method='cube', parent=view.scene,
                               edge_color='black')

sphere1.transform = STTransform(translate=[-2.5, 0, 0])
sphere3.transform = STTransform(translate=[2.5, 0, 0])

view.camera.set_range(x=[-3,3])

if __name__ == '__main__' and sys.flags.interactive == 0:
    canvas.app.run()

Update example to demo various tessellations
Update example to demo various tessellations

  
  import sys
  
  from vispy import scene
- canvas = scene.SceneCanvas(keys='interactive', size=(800, 600), show=True)
+ from vispy.visuals.transforms import STTransform
+ 
+ canvas = scene.SceneCanvas(keys='interactive', bgcolor='white',
+                            size=(800, 600), show=True)
  
  view = canvas.central_widget.add_view()
  view.camera = 'arcball'
- view.padding = 100
  
+ sphere1 = scene.visuals.Sphere(radius=1, method='latlon', parent=view.scene,
+                                edge_color='black')
+ 
- sphere = scene.visuals.Sphere(radius=1, method='ico', parent=view.scene,
+ sphere2 = scene.visuals.Sphere(radius=1, method='ico', parent=view.scene,
-                               edge_color='black')
+                                edge_color='black')
+ 
+ sphere3 = scene.visuals.Sphere(radius=1, method='cube', parent=view.scene,
+                                edge_color='black')
+ 
+ sphere1.transform = STTransform(translate=[-2.5, 0, 0])
+ sphere3.transform = STTransform(translate=[2.5, 0, 0])
+ 
+ view.camera.set_range(x=[-3,3])
  
  if __name__ == '__main__' and sys.flags.interactive == 0:
      canvas.app.run()
  
Update example to demo various tessellations
## Code Before:

import sys

from vispy import scene
canvas = scene.SceneCanvas(keys='interactive', size=(800, 600), show=True)

view = canvas.central_widget.add_view()
view.camera = 'arcball'
view.padding = 100

sphere = scene.visuals.Sphere(radius=1, method='ico', parent=view.scene,
                              edge_color='black')

if __name__ == '__main__' and sys.flags.interactive == 0:
    canvas.app.run()

## Instruction:
Update example to demo various tessellations
## Code After:

import sys

from vispy import scene
from vispy.visuals.transforms import STTransform

canvas = scene.SceneCanvas(keys='interactive', bgcolor='white',
                           size=(800, 600), show=True)

view = canvas.central_widget.add_view()
view.camera = 'arcball'

sphere1 = scene.visuals.Sphere(radius=1, method='latlon', parent=view.scene,
                               edge_color='black')

sphere2 = scene.visuals.Sphere(radius=1, method='ico', parent=view.scene,
                               edge_color='black')

sphere3 = scene.visuals.Sphere(radius=1, method='cube', parent=view.scene,
                               edge_color='black')

sphere1.transform = STTransform(translate=[-2.5, 0, 0])
sphere3.transform = STTransform(translate=[2.5, 0, 0])

view.camera.set_range(x=[-3,3])

if __name__ == '__main__' and sys.flags.interactive == 0:
    canvas.app.run()
