widgetti / ipyvolume

3d plotting for Python in the Jupyter notebook based on IPython widgets using WebGL
MIT License
1.95k stars 236 forks source link

WIP: AR support #397

Open mariobuikhuizen opened 3 years ago

maartenbreddels commented 3 years ago

Sharing the demo:

https://user-images.githubusercontent.com/1765949/140309606-6960015a-e729-4173-92c4-3b6d246e1da0.mp4

It seems also that the floor is moving wrt the scene btw.

maartenbreddels commented 3 years ago

To reproduce the klein bottle:

fig = ipv.figure()
ipv.examples.klein_bottle()
ipv.save("ar.html", devmode=True)

To make sure we pick up the right ipyvolume from this branch:

$ (cd js; npm run watch:dev) 
$ ln ~/src/ipyvolume/js/dist/index.js.map index.js.map 
$ ln ~/src/ipyvolume/js/dist/index.js ipyvolume.js
$ python -m ipyvolume.server

Open from your phone:: https:///ar.html (ignore the self signed certificate and continue) click the AR button (only visible when your phone supports it).

@mariobuikhuizen can you share the link where all supported devices are listed?

mariobuikhuizen commented 3 years ago

Supported devices: https://developers.google.com/ar/devices.

For iOS https://labs.mozilla.org/projects/webxr-viewer/ can be used.

mariobuikhuizen commented 3 years ago

@maartenbreddels how can I get your example running? Where does the python code go?

maartenbreddels commented 3 years ago

just execute it from anywhere, in a script, or from the REPL, since we save it to HTML, no jupyter environment is needed.

mariobuikhuizen commented 3 years ago

Ah, missed the saving to HTML.

smith-kyle commented 9 months ago

I'm a little late to the party, but I noticed you all aren't using a notebook review tool and wanted to invite you to review this pull request with GitNotebooks: https://gitnotebooks.com/widgetti/ipyvolume/pull/397

It lets you do things like comment on rendered markdown and code cells, so might be an easy win for your PR reviews.