Virtual reality

Ipyvolume can render in stereo, and go fullscreen (not supported for iOS). Together with Google Cardboard <https://vr.google.com/cardboard/>_ or other VR glasses (I am using VR Box 2) this enables virtual reality visualisation. Since mobile devices are usually less powerful, the example below is rendered at low resolution to enable a reasonable framerate on all devices.

Open this page on your mobile device, enter fullscreen mode and put on your glasses, looking around will rotate the object to improve depth perception.

[1]:
import ipyvolume as ipv
aqa2 = ipv.datasets.aquariusA2.fetch()
fig = ipv.figure(width=256, height=256)
fig.orientation_control = True  # listen to the device changing orientation when you move your head
ipv.volshow(aqa2.data.T, lighting=True, level=[0.16, 0.25, 0.46],
                 stereo=True, opacity=0.06)
ipv.show()
Downloading https://github.com/maartenbreddels/ipyvolume/raw/master/datasets/aquarius-A2.npy.bz2 to /home/docs/.ipyvolume/datasets/aquarius-A2.npy.bz2
--2021-11-01 12:39:12--  https://github.com/maartenbreddels/ipyvolume/raw/master/datasets/aquarius-A2.npy.bz2
Resolving github.com (github.com)... 140.82.112.4
Connecting to github.com (github.com)|140.82.112.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.githubusercontent.com/maartenbreddels/ipyvolume/master/datasets/aquarius-A2.npy.bz2 [following]
--2021-11-01 12:39:13--  https://raw.githubusercontent.com/maartenbreddels/ipyvolume/master/datasets/aquarius-A2.npy.bz2
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.110.133, 185.199.109.133, 185.199.108.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.110.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 756826 (739K) [application/octet-stream]
Saving to: ‘/home/docs/.ipyvolume/datasets/aquarius-A2.npy.bz2’

aquarius-A2.npy.bz2 100%[===================>] 739.09K  --.-KB/s    in 0.05s

2021-11-01 12:39:13 (14.7 MB/s) - ‘/home/docs/.ipyvolume/datasets/aquarius-A2.npy.bz2’ saved [756826/756826]