Mlab renders black screen on ubuntu 20.04

100 Views Asked by At

Im just trying to configure a simple mlab example:

   from numpy import pi, sin, cos, mgrid

    dphi, dtheta = pi / 250.0, pi / 250.0
    [phi, theta] = mgrid[0:pi + dphi * 1.5:dphi, 0:2 * pi + dtheta * 1.5:dtheta]
    m0 = 4;
    m1 = 3;
    m2 = 2;
    m3 = 3;
    m4 = 6;
    m5 = 2;
    m6 = 6;
    m7 = 4;
    r = sin(m0 * phi) ** m1 + cos(m2 * phi) ** m3 + sin(m4 * theta) ** m5 + cos(m6 * theta) ** m7
    x = r * sin(phi) * cos(theta)
    y = r * cos(phi)
    z = r * sin(phi) * sin(theta)

    # View it.
    from mayavi import mlab
    mlab.figure(bgcolor=(0.5,0.5,0.5))
    s = mlab.mesh(x, y, z, color=(1,0,0))
    mlab.show()

however it renders a black screen! :: MLAB output

I have so far rebuilt basically everything, running python 3.6.9, i just rebuilt VTK thinking it was something on their backend. Im relatively new to Ubuntu and very new to debugging GFX errors!

Weirdly I get no error codes, I can also render simple things like glxgears. Additionally to this I can take screenshots of the model im trying to manipulate: JPEG SCREENSHOT

Clearly in rendering it, but i have no viewport?

Any and all help gratefully received!

0

There are 0 best solutions below