I am having a problem with the roll angle not working in vispy turntable camera.
def surface_3D(x, y, z, name):
canvas = scene.SceneCanvas(keys='interactive')
view = canvas.central_widget.add_view()
view.camera = 'turntable'
view.camera.center = (0,0,0)
view.camera.fov = 50
view.camera.distance = 3
view.camera.azimuth = -90
view.camera.elevation = 30
view.camera.roll = 30 # This angle is not working
Y, X = np.meshgrid(y, x)
tray1 = np.zeros_like(X)
tray2 = np.zeros_like(X)
tray1[0,:] = 0.5 ; tray1[:,0] = 1 ; tray1[-1,:] = 1 ; tray1[:,-1] = 1
tray2[0,:] = z[0,:] ; tray2[:,0] = z[:,0] ; tray2[-1,:] = z[-1,:] ; tray2[:,-1] = z[:,-1]
surface = scene.visuals.SurfacePlot(x, y, z, shading='smooth', color='#289fd2')
surface1 = scene.visuals.SurfacePlot(x, y, tray1, shading='smooth', color=(0.5,0.5,0.5,0.2))
surface2 = scene.visuals.SurfacePlot(x, y, tray2, shading='smooth', color='#289fd2')
view.add(surface)
view.add(surface2)
view.add(surface1)
canvas.show(run=True)
im = _screenshot((0, 0, canvas.size[0], canvas.size[1]))
io.imsave('vispy_screenshot.png', im)
return
Even though I give 30 degree roll angle the view is not rotating. But azimuth, elevation and center works perfectly.
My main purpose here is to roll the camera instead of the rolling the tank for animation pupose. (Sloshing research).